Translating with DrWatson… this can take a few seconds the first time.
This is a genuine, complex translation. DrWatson protects commands, error codes, and log output while naturally translating the surrounding text. It’s translated once and saved.
Katrin — — source: Informix-list mailing list archive (1991-1998)
Hi,
I decided to use trigger for writing derived values in the database,
instead of using client mechanisms.
I have a table "address" which contains the zip code and a zip code area
number. The zip code area will be changed depending from the zip code.
my trigger statement is:
create trigger upd_adrupdate of zipcode on address
referencing NEW as newzc
for each row
(execute procedure getnielsen(newzc.zipcode) into zipcodear);
The trigger is successfull when the triggering value (gotten from a
lookup table by the stored procedure) is not in the set clause of the
update statement.
e.g.
update address set(zipcode) = "10117" -- works fine
update address set(zipcode, zipcodear) = "10117", 0 -- fails with 747
My problem is that I have to use the second statement because the client
program generates the complete update list for all columns of a table.
Is there another way of creating a trigger which writes derived values
into the table despite of the update clause ?
Thank you in advance
Katrin G'ricke
__________
_/_/_/_/_/ _/_/_/_/ _/_/_/_/ Katrin Goericke katrin@taz.de
_/ _/ _/ _/ die tageszeitung
_/ _/_/_/_/ _/ Germany
_/ _/ _/ _/ D-10969 Berlin Phone:
+49-30-2516092
_/ _/ _/ _/_/_/_/ Kochstr. 18 FAX :
+49-30-2510694
We use strictly necessary cookies to make this site work. With your
consent we’d also use optional cookies for analytics and marketing. You can accept all,
reject all, or choose. Read our Cookie Policy.