Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Help with update trigger on same column
I need to implement an update trigger on a table that contains information about a customer's purchase. When the transaction is complete, the price of the sale is updated by the app. Once that happens, I then need to go back and adjust the updated row to reflect a currency conversion. The update by the app will cause the trigger to fire and the trigger will in turn perform an update of the price column.
Is this possible? Wouldn't that be like entering into a loop? The update causes the trigger to fire and since the trigger performed an update on the same column, it would fire again, and so on and so on.
Any advice on writing this? Should it be a Before or After update trigger?
My thoughts in psuedo code:
When update occurs on price column in transaction table
Fire trigger which updates price column in transcation table
Relate session ID to catalog currency and adjust price colum by proper conversion rate
Thanks....
Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Mon Aug 28 2000 - 16:47:28 CDT