Hi-

This syntax isnt working.
I cant figure out what i am doing wrong.
I created a budget calculator with a sqlite java
wrapper/driver.  I am trying to make it a little
easier to use.

thanks for any tips!
jim


CREATE TRIGGER fki_statusDetail_statusMaster_id
BEFORE INSERT ON Status_Detail
FOR EACH ROW BEGIN 
  SELECT CASE
     WHEN ((SELECT ID FROM Status_Master WHERE ID =
NEW.Detail_ID) IS NULL)
     THEN RAISE(ABORT, 'insert on detail "table"
violates foreign key ' )
  END;
END;


                
__________________________________ 
Yahoo! Mail - PC Magazine Editors' Choice 2005 
http://mail.yahoo.com

Reply via email to