Link to home
Start Free TrialLog in
Avatar of Fordraiders
FordraidersFlag for United States of America

asked on

for dates in query need equivalent to sql server syntax

In the query below,
on the where statement. is there a method the same as  "datediff"
WHERE ((DateDiff('d',[date_proposal_completed],Date())<+30) AND ((dbo_temp_proposal_survey_results.wl_status) Is Null));
I need to change this syntax to sql server syntax. Please.


SELECT dbo_temp_proposal_survey_results.proposal_id, dbo_temp_proposal_survey_results.specialist_responsible, dbo_temp_proposal_survey_results.customer_name, dbo_temp_proposal_survey_results.date_proposal_completed, dbo_temp_proposal_survey_results.seller_racf_id, dbo_temp_proposal_survey_results.seller_email, dbo_temp_proposal_survey_results.wl_emailed_on, dbo_temp_proposal_survey_results.wl_survey_completed_on, dbo_temp_proposal_survey_results.wl_status, dbo_temp_proposal_survey_results.wl_Q1_answer, dbo_temp_proposal_survey_results.wl_Q2_answer, dbo_temp_proposal_survey_results.wl_Q3_answer, dbo_temp_proposal_survey_results.wl_Feedback, dbo_temp_proposal_survey_results.wl_ReasonLoss
FROM dbo_temp_proposal_survey_results
WHERE ((DateDiff('d',[date_proposal_completed],Date())<+30) AND ((dbo_temp_proposal_survey_results.wl_status) Is Null));

Open in new window



Thanks
fordraiders
ASKER CERTIFIED SOLUTION
Avatar of Jim Horn
Jim Horn
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
>on the where statement. is there a method the same as  "datediff"
Yep.  That would be DATEDIFF.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Fordraiders

ASKER

Thanks to all..