Please start any new threads on our new site at 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!
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 SQL Sever 2005
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Starting Member

5 Posts

Posted - 04/20/2011 :  13:46:13  Show Profile  Reply with Quote
I am working on a school project on sql server 2005. I then have to validate orderdate column to accept a date which is not greater than current date.

I tried to use the following syntax but did not work;;


Help me on how I can validate the field..

Constraint Violating Yak Guru

384 Posts

Posted - 04/20/2011 :  13:50:13  Show Profile  Reply with Quote
To get the current date use GETDATE() instead of Now().

Hey, it compiles.
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.07 seconds. Powered By: Snitz Forums 2000