Subject | Re: [firebird-support] ...create trigger problem |
---|---|
Author | Helen Borrie |
Post date | 2004-06-24T10:48:27Z |
At 12:32 PM 24/06/2004 +0200, you wrote:
rows somewhere.
What you want is
IF (EXISTS(SELECT 1 FROM WEITERVERARB
WHERE AUSLAGE = OLD.NUMMER)) THEN
>Hi firebird group,You can't do this in PSQL - if you select, you have to put the returned
>
>when i try to execute my sql file (definition of the file is below) i get
>this error:
>
>h-2.05b$ ./isql -u user -p pwd localhost:/var/firebird/test.fdb -i
>/Firebird_Trigger.sql
>Statement failed, SQLCODE = -104
>
>Dynamic SQL Error
>-SQL error code = -104
>-Token unknown - line 9, char 55
>-;
>Expected end of statement, encountered EOF
>
>
>
>Here is the Definiton of the Firebird_Trigger.sql file:
>
>SET TERM !! ;
>CREATE TRIGGER AUSLAGE_CHANGE FOR AUSLAGE
>ACTIVE
>AFTER DELETE OR UPDATE
>POSITION 0
>AS
>BEGIN
>SELECT * FROM WEITERVERARB WHERE AUSLAGE = OLD.NUMMER ;
rows somewhere.
What you want is
IF (EXISTS(SELECT 1 FROM WEITERVERARB
WHERE AUSLAGE = OLD.NUMMER)) THEN
>/* REMOVE THIS ***********IF (sqlcode = 0) THEN *************** *//heLen
>exception auslage_nummer;
>END !!
>SET TERM ; !!