Re: Question about SQL statement error

From: Richard Huxton <dev(at)archonet(dot)com>
To: Mário Gamito <gamito(at)netual(dot)pt>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Question about SQL statement error
Date: 2004-08-25 11:54:59
Message-ID: 412C7E13.4060207@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Mário Gamito wrote:
> Hi,
>
> I'm a newbie at postgreSQL, although i have years of experience with MySQL.

Hi Mario. No problem, but try not to reply to existing messages to post
a new question.

> My question is (and i tried to found the answer):
> why this gives an error ?
>
> SELECT url_negado INTO OUTFILE '/tmp/urls_negados.txt' FROM urls_negados;

INTO OUTFILE ... is not SQL.

From psql you can use:
\o MYFILE.TXT
SELECT * FROM ...

SQL syntax is in the "SQL COMMANDS" section of the manuals. See the
"client applications" section for details on psql.

HTH
--
Richard Huxton
Archonet Ltd

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Gaetano Mendola 2004-08-25 11:55:11 Re: Question about SQL statement error
Previous Message Michael Glaesemann 2004-08-25 11:54:07 Re: Question about SQL statement error