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
 SQL Server 2008 Forums
 Transact-SQL (2008)
 Help checking condition
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

maddyslayer
Yak Posting Veteran

57 Posts

Posted - 06/12/2013 :  10:19:08  Show Profile  Reply with Quote
What does this do?

This is being used as an add condition on a sql select statement
convert(varchar(15),date,101) >=convert(varchar(15),adddate(),101)

visakh16
Very Important crosS Applying yaK Herder

India
52309 Posts

Posted - 06/12/2013 :  10:40:19  Show Profile  Reply with Quote
checking if date returned by adddate() function is greater than value in date column

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/
https://www.facebook.com/VmBlogs
Go to Top of Page

djj55
Constraint Violating Yak Guru

USA
311 Posts

Posted - 06/12/2013 :  13:53:16  Show Profile  Reply with Quote
Please note that this criteria will compare VARCHAR's not DATE's. Thus "05/02/2013" will be before "05/01/2012".


djj
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.03 seconds. Powered By: Snitz Forums 2000