Re: [GENERAL] Exporting postgres query to CSV

2006-05-15 Thread Jim C. Nasby
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

Re: [GENERAL] Exporting postgres query to CSV

2006-05-10 Thread Nis Jorgensen
[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

Re: [GENERAL] Exporting postgres query to CSV

2006-05-09 Thread SCassidy
ubject: [GENERAL] Exporting postgres query

Re: [GENERAL] Exporting postgres query to CSV

2006-05-09 Thread John Purser
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.

[GENERAL] Exporting postgres query to CSV

2006-05-09 Thread Ryan Suarez
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 -