should those be INs instead of =s?

        WHERE coupon_id IN (SELECT coupon_id FROM deleted)

?

how many rows come back from deleted?

-----Original Message-----
From: Duane Boudreau [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 24, 2002 7:53 PM
To: CF-Talk
Subject: OT: SQL Delete Trigger


This is my first attempt at a trigger. I have the following code, but it
doesn't seem to be deleting the records from the respondant or question
table. Any ideas why?


CREATE TRIGGER trg_DeleteCoupon ON coupon FOR DELETE  AS

        DELETE
        FROM respondant
        WHERE coupon_id = (SELECT coupon_id FROM deleted)

        DELETE
        FROM question
        WHERE coupon_id = (SELECT coupon_id FROM deleted)


Thx,
Duane


______________________________________________________________________
Get the mailserver that powers this list at http://www.coolfusion.com
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to