Re: Insert into sintax - Mailing list pgsql-general

From Doug McNaught
Subject Re: Insert into sintax
Date
Msg-id 87acx9p4qr.fsf@asmodeus.mcnaught.org
Whole thread Raw
In response to Insert into sintax  (Josué Maldonado <josue@lamundial.hn>)
List pgsql-general
Josué Maldonado <josue@lamundial.hn> writes:

> Hello list,
>
> Could anyone point me the rigth way to write this query:
>
> INSERT INTO ped_cam
>     (SELECT * from ped_pro where ped_pk=lnpedpk)
>     WHERE NOT EXISTS (SELECT ped_pk FROM ped_cam
>      WHERE ped_pk=lnpedpk);
>
> I got this:
> ERROR:  syntax error at or near "WHERE" at character 63

You've misparenthesized.

-Doug
--
Let us cross over the river, and rest under the shade of the trees.
   --T. J. Jackson, 1863

pgsql-general by date:

Previous
From: Josué Maldonado
Date:
Subject: Insert into sintax
Next
From: Duane Lee - EGOVX
Date:
Subject: Re: Insert into sintax