Hello,

I have run into a problem with a trigger that I can't solve.  I am trying to
archive rows that are deleted out of one table into another table.  I have
two tables and one trigger that look like this:

create table foo (fooint integer primary key, footext char(64), foodate
date) and
create table fooarchive(fooint integer not null, footext char(64), foodate
date, fooupdate timestamp, foouser varchar(32))

and one trigger:
create trigger foo_upd for myuser.foo after delete execute (
  try
    insert into myuser.fooarchive values( :old.fooint, :old, footext,
:old.foodate, timestamp, user);
  catch
    if $rc <> 0 then stop ($rc, $errmsg);
)

This approach works fine except for the date field.  When that field was
added, the trigger failes with a message -3048 Invalid date format: ISO.  I
have tried changing the DATE_TIME_FORMAT parameter to INTERNAL, USA, ISO,
etc. but that doesn't alleviate the problem.  I still cannot select a date
from one date field and insert it into another date field within a trigger.
Does anyone see what I'm missing?

Thanks

--
Mark Thomas
United Drugs
<[EMAIL PROTECTED]>

<<attachment: winmail.dat>>

Reply via email to