>From psql:
test => \o <ouput-file-name>
test => <Enter your query here>
test => \o
This will leave the results of your query in the file "output-file-name"
This IS covered in the documentation and from within psql with \h
len morgan
-----Original Message-----
From: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
To: NEERAJ BANSAL <[EMAIL PROTECTED]>
Cc: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
Date: Wednesday, June 14, 2000 2:46 AM
Subject: Re: [GENERAL] Help: How to store query output in a file !!!
>>
>> Does anyone knows how do you send query output to a file???
>
>Welcome to Unix(TM):
>
>psql <database> -c "select * from <table name>, etc." > <file name>
>
>See also:
>
>http://www.isu.edu/departments/comcom/unix/workshop/io.html
>
>or, type "unix tutorial" in any web search engine.
>
>--Gene
>
>> I tried following but it does not work:
>> select * from <table name> \o <file name> ;
>>
>> Please let me know if anyone knows!! Thanks in advance
>>
>> Neeraj
>> [EMAIL PROTECTED]
>
>