Trigger question. -Reply
Posted in 1996
My understanding is that what you are
suggesting is not possible in an insert
operation without standing on your head
(IE pass the key to a stored procedure,
do something fancy in there to handle
all the concurrency problems).
We abandoned all thoughts of trying to
do it. Informix does not let you amend
the contents of a row on insert.
On update is another matter.
you should be able to do something like
this.
create trigger mytrig update of afield
on mytableafter (update mytable set mydatefield =
SomeFormOfNow)
You might have to mess around with
stored procedures to get it to work but
theoretically you should be able to do
it.
HTH
--
--
Peter Tashkoff <tashkop@kiwi.co.nz>
NZ Kiwifruit Marketing Board Usual
disclaimers apply.
This posting may not be used by any
party to vilify another.
>>> Spetc <spetc@aol.com>
22/August/1996 10:48am >>>
Suppose you have a table with a date
last modified column (datetime year to
second.)
This column would be stamped with the
current date and time whenever a row is
inserted or modified in the table.
This would ideally be done via inserts
and update triggers.
Do anyone know how to use a trigger to
intercept the insert or update and set
this value prior to the insert / update
operation?