Insert into sintax - Mailing list pgsql-general

From Josué Maldonado
Subject Insert into sintax
Date
Msg-id 4112B9AB.2010204@lamundial.hn
Whole thread Raw
Responses Re: Insert into sintax  (Doug McNaught <doug@mcnaught.org>)
List pgsql-general
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


Thanks,

--
Sinceramente,
Josué Maldonado.
"¿Porqué es tan difícil <querer>, mientras es tan fácil <desear>? Porque
en el deseo se expresa la impotencia, y en el querer, la fuerza. "

pgsql-general by date:

Previous
From: Amir Zicherman
Date:
Subject: getting dead locks with 2 functions
Next
From: Doug McNaught
Date:
Subject: Re: Insert into sintax