Triggers
Posted in 1998
Topics: Security, Permissions & Auditing, Triggers, Constraints & Referential Integrity, Jobs, Consulting & Announcements
This is a multi-part message in MIME format.
--------------392ECFB35E256592633376E2
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
I have to start doing some auditing on about 100-125 tables in an
informix db (SE5 for now, soon to be Online7) so I figured I would use
triggers. As a test, I created a duplicate table to one of the existing
ones and added two fields at the beginning of the record. One for the
username and one for the current time. The problem is that when I tried
to create the following trigger, it did not like the '.*' of the
post_upd.*. Do I have to specifically enter every field or is there some
other way to treat the post_upd as a normal record like type of
variable.
create trigger tr_contractinsert on contract
referencing new as post_upd
for each row ( insert into lg_contract values ( USER , CURRENT ,
post_upd.* ) )
This only works if the insert values ar ( USER , CURRENT ,
post_upd.contract_id , post_upd.create_date , etc.). I cannot get it
working with post_upd.*. Any help would be appreciated to keep me from
going insane creating hundreds of triggers and having to manually key in
the column names. Thanks for any help ahead of time.
--------------392ECFB35E256592633376E2
Content-Type: text/x-vcard; charset=us-ascii; name="vcard.vcf"
Content-Transfer-Encoding: 7bit
Content-Description: Card for Jason Peck
Content-Disposition: attachment; filename="vcard.vcf"
begin: vcard
fn: Jason Peck
n: Peck;Jason
org: Tower Consultants, Inc.
adr: 3385 Veterans Memorial Highway;;Suite F;Ronkonkoma;NY;11779;USA
email;internet: jason@towerinfo.com
title: Vice-President
tel;work: 516-471-8393
tel;fax: 516-471-8436
tel;home: 516-736-7952
x-mozilla-cpt: ;0
x-mozilla-html: TRUE
version: 2.1
end: vcard
--------------392ECFB35E256592633376E2--