Re: How to export query results to excel file using psql command in postgresql

Поиск
Список
Период
Сортировка
От Pavel Stehule
Тема Re: How to export query results to excel file using psql command in postgresql
Дата
Msg-id CAFj8pRCdEk-JAZw82ZfVfKFWPGcR2nzGbbxWDvjCAHApESX-9g@mail.gmail.com
обсуждение исходный текст
Ответ на How to export query results to excel file using psql command in postgresql  (Naveen Kumar <naveenmcp@gmail.com>)
Список pgsql-general
Hi

čt 13. 8. 2020 v 16:10 odesílatel Naveen Kumar <naveenmcp@gmail.com> napsal:
How to export query results to excel file using psql command in postgresql

Excel can import csv file

so you can

for Postgres 12

\pset format csv
\o path_to_file
select * from ...

or for older postgres

\copy (select * from ...) to path_to_file CSV HEADER

Regards

Pavel

В списке pgsql-general по дате отправления:

Предыдущее
От: Naveen Kumar
Дата:
Сообщение: How to export query results to excel file using psql command in postgresql
Следующее
От: Paul Förster
Дата:
Сообщение: Re: How to export query results to excel file using psql command in postgresql