Re: triggers dump to text file
Posted in 1996
:-) :-) I have a need for a trigger to cause output to a text file. The trigger :-) I attempted was :-) :-) create trigger ins_test :-) insert on test :-) referencing new as new_test :-) for each row(output to foo select * from test where :-) fieldname=new_test.fieldname) :-) :-) It appears Informix doesn't like 'output' in the trigger. Anybody know :-) how to get around this? According to the docs, output and unload are :-) also not welcome in stored procedures. :-) :-) I am currently looking into using trace in a stored procedure, but I feel :-) like I am missing something. :-) :-) Thanks for any help :-) :-) Larry DiGiovanni :-) :-) Larry, You are probably correct in thinking that the answer is an SP. The way I would do this is to change the trigger to: for each row(execute procedure xxx(col1)) where col1 is the primary key of "test", then in the SP use a system command to run an ACE report that sends its output to a file. system "sacego -s yyy"; HTH, Richard. ----------------------------------------------------------------- | _________ | Richard Thomas | | / /_______| | r.thomas@csl.gov.uk | | / /__/ | | | /_/ | TRIGGER happy ;-) | | | | -----------------------------------------------------------------