I know this function would likely be better accomplished by the software product I am using, but currently it doesn't allow.... I want to create a trigger that will generate a RAISERROR when an appointment is created on a day that has passed. Essentially when appt_date (datetime) is less than GETDATE() on INSERT. Here is what I have so far: CREATETRIGGER dbo.appt_timeprior ON dbo.appt AFTERINSERT AS BEGIN SETNOCOUNTON; IF appt_date<GETDATE()) RAISERROR(50001, 10, 1) END I think the IF line is the incorrect one. Not sure how to get this to a functional point. Any help is much appreciated!