One more thing, you database will need to have recursive triggers set to
on in it's options.

-----Original Message-----
From: Duane Boudreau [mailto:[EMAIL PROTECTED]] 
Sent: 03 December 2002 17:15
To: CF-Talk
Subject: SQL:Trigger Question

Hi All,

I have a db (MSSQL) with the following tables:

Position         Questions     Response
position_id  question_id   response_id
             position_id   question_id

I need to design the triggers that will automatically delete related
records
from the question and responses table.

I thought my triggers should look like:

CREATE TRIGGER trig_Delete ON position
FOR DELETE
AS
DELETE
FROM question
WHERE position_id = deleted.position_id

CREATE TRIGGER trig_Delete ON question
FOR DELETE
AS
DELETE
FROM resume_applications
WHERE question_id = deleted.question_id


Can anyone help me out on the correct syntax here?

Thanks,
Duane


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Get the mailserver that powers this list at http://www.coolfusion.com

Reply via email to