Re: dbaccess format question
Posted in 1997
On 10 Oct 97 at 12:40, 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.
There is a FAQ - check my .sig.
> 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.
The short version is:
echo 'unload to filename select * from table' | dbaccess db_name
How's that? :-)
--
Ciao,
Billy
Nose to the ear in Johannesburg -- Murder City never looked so good!
Get FAQ'ed at http://www.iiug.org/techinfo/faq/faq_top.html
PISCES
Feb. 19 - Mar. 20
You have a vivid imagination and often think you
are being followed by the FBI or CIA. You have
minor influence over your friends and people
resent you for flaunting your power. You lack
confidence and are generally a coward. Pisces
people screw small animals and pick their noses.