Skip site navigation (1) Skip section navigation (2)

Export query result to text file?

From: "Patrick Hatcher" <PHatcher(at)macys(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Subject: Export query result to text file?
Date: 2002-03-27 22:40:27
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-novice
I'm trying to use a query to export some data.  My file is created, but no
data is available.  If I run the query without exporting, it works fine.
Select * from table1 limit 100 \o /home/phatcher/test.txt;

must I always route the file first and then do my query?

Patrick Hatcher
Legacy Integration Developer
415-932-0610 office
HatcherPT - AIM


pgsql-novice by date

Next:From: Dave DartnallDate: 2002-03-28 02:54:54
Subject: Formatted printing output
Previous:From: RobDate: 2002-03-27 18:09:16
Subject: Synchronizing databases

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group