Re: Extracting data into .csv format

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The "Copy" statement (and \copy for local access

COPY (
select * from (.........
) TO ' || '''' || filname || '''' || ' with csv header'


STeve

-----Original Message-----
From: pgsql-admin-owner@xxxxxxxxxxxxxx [mailto:pgsql-admin-owner@xxxxxxxxxxxxxx] On Behalf Of Ferrell, Denise D CTR NSWCDD, H11
Sent: Wednesday, February 17, 2016 11:49 AM
To: pgsql-admin@xxxxxxxxxxxxxx
Subject:  Extracting data into .csv format

Using PostgreSQL 9.3 on Linux

I'm trying to extract data into a comma delimited format and not having much success...seems to act totally different from Oracle.  Does anyone have any suggestions?

Thank you in advance.
Denise
THIS MESSAGE (AND ALL ATTACHMENTS) IS INTENDED FOR THE USE OF THE PERSON OR ENTITY TO WHOM IT IS ADDRESSED AND MAY CONTAIN INFORMATION THAT IS PRIVILEGED, CONFIDENTIAL AND EXEMPT FROM DISCLOSURE UNDER APPLICABLE LAW. If you are not the intended recipient, your use of this message for any purpose is strictly prohibited. If you have received this communication in error, please delete the message without making any copies and notify the sender so that we may correct our records. Thank you.

-- 
Sent via pgsql-admin mailing list (pgsql-admin@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux