While Creating a Trigger , i am getting the following errors...
Set up is as follows :
DB2 UDB V7.2 on windows NT Server. Connected to the Server thru Command Center from the Client.
The Statement Terminator has been set to "?" in the Tools Settings.
CREATE TRIGGER TRG_CM_LOC_MODIFY
NO CASCADE BEFORE UPDATE ON TBL_CM_LOC
REFERENCING OLD AS O NEW AS N
FOR EACH ROW MODE DB2SQL
WHEN (N.VER_NUM != O.VER_NUM) SIGNAL SQLSTATE '75000' ('Record Already Updated by another User...')?
SET N.MODIFIED_DATE = CURRENT TIMESTAMP;
on compiling above Code, I am getting the following error...
DB21034E The command was processed as an SQL statement because it was not a valid Command Line Processor command. During SQL processing it returned:
SQL0104N An unexpected token "CREATE TRIGGER TRG_CM_LOC_MODIFY N" was found following "BEGIN-OF-STATEMENT". Expected tokens may include:
"<update_clause>". LINE NUMBER=5. SQLSTATE=42601
Note : if I don't give the when Statement, the Trigger is compiled successfully.