SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 SQL CDate -need help urgent
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

theKid27
Starting Member

21 Posts

Posted - 02/18/2013 :  20:53:57  Show Profile  Reply with Quote
Hi all,

I'm new to sql can anyone help to explain the below query?

SQL Query :
((CDate(DateAdd("d",[Transit],[Actual Ship Date]))-CDate([Request Date]))>-8)

Whereby the value are as below:
[Transit] = 5
[Actual Ship Date]= 2/6/2013
[Request Date] = 2/22/2013

Thanks


visakh16
Very Important crosS Applying yaK Herder

India
52317 Posts

Posted - 02/18/2013 :  23:41:01  Show Profile  Reply with Quote
its adding 5 days to [Actual Ship Date] and comparing it with [Request Date] by taking the difference between them. this is then checked against condition >-8 to see if resultant value (ie [Actual Ship Date] + 5 days) is lagging behind [Request Date] by 8 days or more

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

theKid27
Starting Member

21 Posts

Posted - 02/24/2013 :  22:32:54  Show Profile  Reply with Quote
Thanks visakh16

Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

India
52317 Posts

Posted - 02/24/2013 :  23:19:37  Show Profile  Reply with Quote
welcome

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.06 seconds. Powered By: Snitz Forums 2000