-
correct use of date functions in a constraint?
I am using the QueryAnalyzer and am stuck on this simple constraint, ive looked at many examples of these functions in books and my syntax seems fine. Yet I have been returned the error
Line 38: Incorrect syntax near ','.
from my constraint:
constraint validate check ((recorddate !< (DATEADD(dd, -14, GETDATE()))),
the following line is another constraint with no problems. I know its something to do with my brackets before the ',' but no matter how many I use I am returned the same error
-
i think you will need to post the full constraint as your 5 '(' don't match the 4 ')' and a "," signifies there is something following that we can not see.
-
Please post the complete SQL statement.
-
its ok now thanks for your interest guys. it was a minor syntax error.
i dont suppose you could just tell me how to list all records for a particular 'family_no' in a table after a specific date? in the form of a query. assuming that record_date and family_no are 2 of the columns of this table.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|