Re: dbaccess format question
Posted in 1997
echo 'unload to output.file select * from table' | dbaccess db_name
tegoetz@srv.pacbell.com on 10/10/97 12:40:24 PM
Please respond to tegoetz@srv.pacbell.com
To: informix-list@rmy.emory.edu
cc: (bcc: David Coburn/ISG/WVUS/WorldVision)
Subject: dbaccess format question
First let me ask if there is a FAQ, because
I'd like to read it. If not, maybe someone
can help me with the following.
I want to run a SQL query from the command line
and have the results saved to a file. Thus, I
do the following:
echo 'select * from table' | dbacess db_name > output.file
Which works, but the output has one column per line
and the column header is listed before each element.
Obviously this takes up way too much space. Can I get
the output to have one row per line and have each
column separated by "|"'s. I sure hope so.
I assume this sort of thing would be in a manual, but
I'm using a system that uses Informix under the covers
and therefore I don't have easy access to the manuals.
Of course, to get anything done I'd like to go straight
to the database.
Thank you,
Tom Goetze
tegoetz@pacbell.com