Hi,

1. Wrote an application similar to the next one
-- Trigger after
-- You can name this store procedure Procedure_U
-- Update trigger - when the row is inserted into a table
SET VAR vNumber INTEGER
SET VAR vDocument_ID INTEGER
SELECT number,Document_ID +
 INTO vNumber ivNumber,vDocument_ID ivDocument_ID +
 FROM ds WHERE CURRENT OF SYS_NEW
-- Zapoved za prekratiavane na platen god otpusk
IF SQLCODE = 0 AND vDocument_ID = 8 THEN
 UPDATE otp_detail SET Time_Stamp = (DATETIME(.#DATE,.#TIME)) +
   FROM otp_detail T1,otp T2 +
     WHERE T1.otp_id = T2.otp_id +
       AND T2.number = .vNumber +
       AND T2.vid_otp = 1
ENDIF
CLEAR VAR vNumber,ivNumber,vDocument_ID,ivDocument_ID
--
RETURN

2. Save the application in file Procedure_U
3. From Rbase prompt
ALTER TABLE TableName DROP TRIGGER UPDATE
DROP PROCEDURE Procedure_U
PUT Procedure_U AS Procedure_U
ALTER TABLE TableName ADD TRIGGER UPDATE Procedure_U

This is not an Oracle store procedure in PL/SQL. There is no begin or end words.
RETURN is the end of any application or store procedure.
Don�t use command separator if you have only one command on a row.


Good luck



Konstantin Gudjev

_________________________________________________________________
MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*. http://join.msn.com/?page=features/virus




Reply via email to