A trigger that affects only one field - TechRepublic
General discussion
February 27, 2010 at 10:37 AM
titomba

A trigger that affects only one field

by titomba . Updated 16 years, 3 months ago

Hello everyone, well i have a little problem, and goes like this.
There is a table which contains numeric values, those need to be calculated and modified from an external program, i cant modify that program since the sourcecode is lost, however i still have the problem of modifying it.

The value is the result of a mathematical operation. My question is, can a trigger do that job?

I mean, ive analized the situation, and being unable to modify the source code, i guess a trigger that takes place after insert for example, could do that job.

My idea or at least what my brain thinks could happen, is that right after the insert of a new record, the trigger will go to the specific row, and affect a specific column writting a new value, that value will be based on the values already present on the other columns.

But here the question is, can a trigger be that precise and affect only one field in a row?

Or maybe im hoping more from a trigger than it can actually do?

Thanks for any advice.

This discussion is locked

All Comments