Funny Parse Error on Insert
Funny Parse Error on Insert
От:
Orion <o2@trustcommerce.com>
Дата:
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?