-
how can i get records from two tables
Hi,
I have two tables
1.Application
column in application are like,
applicationNo,userno,Offerno,Email,Mobile,departme nt
2.Offer
Columns in offer are offerno,startdate,enddate,offertype,offerdesc
Now,I want all application
WHERE offer'startdate is greater than current date and Application's userno='1'
I tried like
ALTER PROCEDURE ERS_SP_GetAvailableApplicationByapplicant
-- Add the parameters for the stored procedure here
@ApplicantID nvarchar(50),
@CurrentDate nvarchar(15)
AS
BEGIN
-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT statements.
SET NOCOUNT ON;
-- Insert statements for procedure here
SELECT * FROM
Application a
INNER JOIN Offer o
ON a.OfferNo=o.OfferNo
WHERE a.ApplicantNo='1'
AND o.SubmissionStartDate >=@CurrentDate
where SubmissionStartDate datatype as well nvarchar(15)
have taken because we save date in arabic
as number like '14311212'
and parameter value will be also in same format
regards
ASIF
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|