Re: Extracting data into .csv format

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

 



On 2016-02-17 11:49 AM, Ferrell, Denise D CTR NSWCDD, H11 wrote:
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
Have you tried something like i.e.:

psql -c "COPY ( QUERY ) TO STDOUT WITH CSV HEADER " > CSV_FILE.csv

Should do the trick (assuming it's basic output you're after).

Regards,

Ziggy


[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