Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Help with update trigger on same column

Help with update trigger on same column

From: <bikesdp_at_my-deja.com>
Date: Mon, 28 Aug 2000 21:47:28 GMT
Message-ID: <8oeml8$82g$1@nnrp1.deja.com>

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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US