Exporting postgres query to CSV

From: Ryan Suarez <ryan(dot)suarez(at)sheridanc(dot)on(dot)ca>
To: pgsql-general(at)postgresql(dot)org
Subject: Exporting postgres query to CSV
Date: 2006-05-09 14:58:07
Message-ID: 4460ADFF.8090005@sheridanc.on.ca
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Bruno Wolff III 2006-05-09 15:18:48 Re: Arguments Pro/Contra Software Raid
Previous Message Reid Thompson 2006-05-09 14:52:26 Re: What is your favorite front end for user interaction