In oracle:
SPOOL filename.txt
Select * from customer;
SPOOL OFF
Results are piped to filename.txt
How do I do this from the psql command line?
John J. Penrod, OCP
Oracle/EnterpriseDB Database Administrator
St. Jude Children's Research
On Monday 26 October 2009 12:03:13 Penrod, John wrote:
In oracle:
SPOOL filename.txt
Select * from customer;
SPOOL OFF
Results are piped to filename.txt
How do I do this from the psql command line?
John J. Penrod, OCP
Oracle/EnterpriseDB Database Administrator
St. Jude
On 26/10/2009 18:03, Penrod, John wrote:
In oracle:
SPOOL filename.txt
Select * from customer;
SPOOL OFF
Results are piped to filename.txt
How do I do this from the psql command line?
\g filename will execute the query and send the result to filename.
Ray.
--
Raymond O'Donnell