On Tue, May 15, 2018 at 8:30 AM, Rhys A.D. Stewart
wrote:
> Greetings,
>
> I have a query in a .sql file and I'd like to use \i to execute it and
> \copy to save it to a csv file. Is there any way to combine the two?
>
> Something along the lines of:
>
> \copy \i myquery.sql to 'output.csv'
>
M
Greetings,
I have a query in a .sql file and I'd like to use \i to execute it and
\copy to save it to a csv file. Is there any way to combine the two?
Something along the lines of:
\copy \i myquery.sql to 'output.csv'
Rhys
Peace & Love|Live Long & Prosper