Picaso.Leonardo@gmail.com wrote:
> Action is stored{kept} in what table made INSERT, DELETE, UPDATE
>
> Example for MS SQL :
>
> insert into table_name(col1,col2,col3,col4) select col1, col2, 'I',> @RC from inserted
The answer is in the Informix Guide to SQL: Syntax manual.
That is available from the IBM web site (quickest way there -
http://www.informix.com/) and look in the library.
I'm not sure how to interpret your question, though - one reason I've
not answered previously, hoping someone else would divine what you were
asking.
The basic mechanism is (for INSERT):
CREATE TRIGGER xx_insert INSERT ON xx
REFERENCING NEW AS NEW
FOR EACH ROW ( INSERT INTO raw_table VALUES('xx', new.col1,
new.col2, ..., USER, CURRENT YEAR TO FRACTION(5))
I've not checked the syntax - or EACH vs EVERY, for example, but the
basic idea might be enough to get you going.
You might also look up 'introspective triggers'. OTOH, you might not;
they're harder to write unless you're quite a good C programmer.
--
Jonathan Leffler #include <disclaimer.h>
Email: jleffler@earthlink.net, jleffler@us.ibm.com
Guardian of DBD::Informix v2007.0914 -- http://dbi.perl.org/
publictimestamp.org/ptb/PTB-2229 haval 2008-01-09 03:00:04
7F98FD0D66441624DB89B1A5EC250E1A