What table is lnpedpk in - ped_cam? What table is ped_pk in - ped_pro and ped_cam?
-----Original Message-----
From: Josué Maldonado [mailto:josue@lamundial.hn]
Sent: Thursday, August 05, 2004 3:50 PM
To: pgsql-general@postgresql.org
Subject: [GENERAL] Insert into sintax
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. "
---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster