Aliza Eisenstein
SSC-Addicted
Points: 408
More actions
June 14, 2004 at 11:14 am
#87695
I am trying to create a rule that will validate that a date field is before now (today, current date, whatever). Does anyone know how I can do this?
Thanks
David.Poole
SSC Guru
Points: 76039
June 14, 2004 at 11:54 am
#510326
CREATE RULE rl_BeforeNow AS @dtDate < GETDATE()
Jonathan Stokes
SSCrazy Eights
Points: 9861
June 15, 2004 at 6:25 am
#510443
Sorry to butt in, David.
Remember to bind the rule to the column that you want the rule on as well using 'sp_bindrule'. The rule does not apply to all date fields.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply