I'm going to set it to 2 when its closed and 1 when it is opened.

Looks like SQL does not like open and closed must be reserved words. But
that does not seem to fix the trigger.


on 5/17/02 3:26 PM, Dan Stein at [EMAIL PROTECTED] wrote:

> I need to know the correct Syntax for this trigger. I'm pretty new at this
> one.
> 
> CREATE TRIGGER [Close_Course] ON [dbo].[Courses]
> 
> FOR  UPDATE 
> 
> AS
> 
> IF UPDATE (Course_Count)
> 
> Set Open_Closed='Closed'
> 
> Where Course_Count > Maximum
> 
> 
> What happens is everytime someone registers for a course it increments the
> course_count. When it is greater than the Maximum I want the column row to
> change to Closed.
> 
> Dan
> 

-- 
Dan Stein
Digital Software Solutions
799 Evergreen Circle
Telford PA 18969
215-799-0192
610-256-2843
Fax 413-410-9682
FMP,Tango, EDI,SQL 7
[EMAIL PROTECTED]
www.dss-db.com


________________________________________________________________________
TO UNSUBSCRIBE: send a plain text/US ASCII email to [EMAIL PROTECTED]
                with unsubscribe witango-talk in the message body

Reply via email to