Re: dbaccess format question
Posted in 1997
On Fri, 10 Oct 1997, Thomas Goetze wrote:
> 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.
Take a look at http://www.iiug.org/ -- its in there.
> 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.
No problem. Use:
echo 'unload to output.file select * from table' | dbaccess db_name
and your problem is solved :)
-Richard