| From: | Bruno Wolff III <bruno(at)wolff(dot)to> |
|---|---|
| To: | Roy Cabaniss <rcaban(at)cabanisspc(dot)uamont(dot)edu> |
| Cc: | pgsql pgsql <pgsql-general(at)postgresql(dot)org> |
| Subject: | Re: exporting join results |
| Date: | 2003-05-29 17:17:57 |
| Message-ID: | 20030529171757.GA15305@wolff.to |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
On Thu, May 29, 2003 at 10:54:37 -0500,
Roy Cabaniss <rcaban(at)cabanisspc(dot)uamont(dot)edu> wrote:
> I have some tables that I am gathering data in. Some of the data
> gathered goes into personal table and the survey results goes into the
> survey table.
>
> I can do a join with no problem to see my results with something like:
>
> select * from personal,survey WHERE personal.pid=survey.pid;
>
> I can do a dump of either table again with no problem.
>
> What I want is to get a dump of the join as a comma separated text file
> so that I can import it into my statistical software.
>
> Any ideas on how to do it?
You can concatenate the columns you want with commas and quotes as
necessary. Also you should use coalesce to handle any null values.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Diogo de Oliveira Biazus | 2003-05-29 17:19:53 | PostgreSQL brazilian community meeting on International Open Source Software Forum |
| Previous Message | Network Administrator | 2003-05-29 17:03:39 | Re: Blocking access to the database?? |