On Tue, May 09, 2006 at 08:57:57AM -0700, John Purser wrote:
> > I am running postgres 7.4.7 on debian sarge.
> First:
> psql -U -o --pset format=unaligned
> --pset fieldsep=',' -c '' -d
>
> I think that will give you the output you were after assuming you're
> scripting psql and that you repl
[EMAIL PROTECTED] wrote:
> A word of advice: if there is any chance that a column (e.g. text) contains
> an embedded newline, you will be much better off outputting the data in
> simple xml, instead of CSV. This works very well with Excel for import. I
> just did a simple program for this recentl
ubject: [GENERAL]
Exporting postgres query
On Tue, 09 May 2006 10:58:07 -0400
Ryan Suarez <[EMAIL PROTECTED]> wrote:
> Greetings,
>
> I am running postgres 7.4.7 on debian sarge.
>
> I need to run an SQL query and store the results in a file. The
> format needs to be comma separated values (CSV), so I can import this
> later in Excel.
Greetings,
I am running postgres 7.4.7 on debian sarge.
I need to run an SQL query and store the results in a file. The format
needs to be comma separated values (CSV), so I can import this later in
Excel.
Any ideas on how to accomplish this?
much appreciated,
Ryan
-