List:MaxDB« Previous MessageNext Message »
From:Piotr Intres Date:July 29 2003 2:34pm
Subject:triggers and NEW variable
View as plain text  
Hello again,

I have written folowing trigger:

CREATE TRIGGER "PRZELEW_DOW_WEWN" FOR "PRZELEW" AFTER INSERT , UPDATE ( 
"DATA_ZAPLACENIA") EXECUTE
(
    VAR
  	<some variables>
    TRY
       BEGIN
          IF (:NEW.DATA_ZAPLACENIA IS NULL OR :NEW.TYP != 53) THEN
             BEGIN
		<some code>
             END;
	.
	.
	.
       END;
    CATCH
	.
	.
	.
)

Documentation says that "... :NEW and :OLD variables must always be used 
with a colon in SQL statements ...".
When I use :NEW.DATA_ZAPLACENIA inside of IF statement (as above) I 
receive "Parameter spec not allowed" message, but when I remove colon 
the message changes to "Table name must be in from list". Please tell 
how to solve it.

Thanx a lot,
Piotr


Thread
triggers and NEW variablePiotr Intres29 Jul