Re: Copy Comand question - Mailing list pgsql-novice

From John Taylor
Subject Re: Copy Comand question
Date
Msg-id 02052708124301.01493@splash.hq.jtresponse.co.uk
Whole thread Raw
In response to Re: Copy Comand question  (Ron Johnson <ron.l.johnson@cox.net>)
Responses Re: Copy Comand question
List pgsql-novice
On Sunday 26 May 2002 04:22, you wrote:
> On Sat, 2002-05-25 at 18:38, Sharon Cowling wrote:
> > Hi,
> >
> > I am using the copy command to create a .csv file, how do I include the table headings, or headings of my choice?
> > The purpose of this paticular .csv file is to enable the users to download data from a web page and then report on
itusing MS Excel.  It works fine apart from not having any headings, which the users need as there can be a lot of data
inthe .csv file. 
> 
> It's not possible. COPY is meant to dump raw data from a table.
> 


I know it is a bit of a bodge - but ...
How about having a heading table.
Then create a view which is a union to the two tables, and copy out the view.

JohnT

pgsql-novice by date:

Previous
From: "Joel Burton"
Date:
Subject: Re: Possible use of a subselect?
Next
From: Rasmus Mohr
Date:
Subject: Re: Copy Comand question