From: Orion <o2@trustcommerce.com>
To: pgsql-sql@postgresql.org
Subject: Funny Parse Error on Insert
Date: Mon, 12 Nov 2001 11:12:18 -0800
Message-ID: <9sp6lt$huk$1@news.tht.net> (raw)
I am getting a parse error on insert and I cant tell why. Anyone better at
SQL what to lend me a hand?
I'm just doing a simple 'INSERT INTO table (x,y) SELECT ...'
Here's my statement and the error.
fdb=> INSERT INTO mfps_action_codes_394 (code,description) SELECT
'$','Dun Notice Printed' WHERE NOT EXISTS (SELECT 1 FROM
mfps_action_codes_394 WERE code = '$');
ERROR: parser: parse error at or near "code"
Note if I remove the WHERE clause from the SELECT it works...
fdb=> INSERT INTO mfps_action_codes_394 (code,description) SELECT '$','Dun
Notice Printed';
INSERT 9751582 1
Why would this happen?
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: o2@trustcommerce.com
Subject: Re: Funny Parse Error on Insert
In-Reply-To: <9sp6lt$huk$1@news.tht.net>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox