RE: Informix SE 7
Posted in 2003
T,
Command line: "dbaccess <database_name> <query_file>" will send the
query results to standard out. You can redirect the output to a file and
redirect standard error to /dev/null or another file (Informix puts stuff
like "Database selected." "10 row(s) retrieved.", etc. to standard error).
i.e. dbaccess <database_name> <query_file> > results_file 2>
/dev/null OR
isql <database_name> <query_file> > results_file 2> /dev/null
Hope that helps.
-Dave
David Buchholz
Sr. Database Administrator
Vital Processing Services
david.buchholz@vitalps.com
-----Original Message-----
From: qwerty [mailto:qwerty@earthling.net]
Sent: Thursday, May 15, 2003 4:59 AM
To: informix-list@iiug.org
Subject: Informix SE 7
I have a requirement to automate a report query in Informix - total newbie -
non informix user - I require an idiots guide to do this please !
I would :-
login to informix
type isql
choose database
choose query
execute
Questions :-
1) how can/do I automate this without interaction.
2) how can I then execute this from a unix/linux command prompt, ie run
informix and run the query.
Thanks
T.