Insert into sintax

From: Josué Maldonado <josue(at)lamundial(dot)hn>
To: pgsql-general(at)postgresql(dot)org
Subject: Insert into sintax
Date: 2004-08-05 22:50:19
Message-ID: 4112B9AB.2010204@lamundial.hn
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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. "

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Doug McNaught 2004-08-05 23:03:24 Re: Insert into sintax
Previous Message Amir Zicherman 2004-08-05 22:42:12 getting dead locks with 2 functions