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

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 (view raw or flat)
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

pgsql-general by date

Next:From: Gaetano MendolaDate: 2004-08-25 11:55:11
Subject: Re: Question about SQL statement error
Previous:From: Michael GlaesemannDate: 2004-08-25 11:54:07
Subject: Re: Question about SQL statement error

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