create triggers
Hi all,
i worked some years ago with Power Amc Designer (6.xx) and i've forgotten
how to create triggers in CDM (can i use business rules ?)... and create (or
generate) triggers.
The used RDBMS are Oracle 8.1.7 and Sql Server 2000.
I know what it should happen :
- the event is : when a column ('status') is updated as 1.
- the action is : a record is moved (inserted into a clone table & deleted
from the table source).
My purpose is to add an update trigger into my PDMs (one for sql server &
one for oracle), but i would be happy to leearn more about this subject !
the 'algorythmic' schema is like this :
- declaration of the update trigger
- begin
---begin transaction
------- insert into backup_table ... (from the current updated line...into
the source table)
------- delete from the current source table
---else (transaction failed...)
-------rollback
- end
do i need two transactions for insertion & deletion ... ?
i need some helmp about triggers & transactions, i'm not a guru :-D
thanks a lot if you have some informations about to do that quickly ;-)))
Pierre
|