Please start any new threads on our new site at http://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | 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
 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
52326 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
52326 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  
 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.05 seconds. Powered By: Snitz Forums 2000