| From: | Duane Lee - EGOVX <DLee(at)mail(dot)maricopa(dot)gov> |
|---|---|
| To: | 'Josué Maldonado' <josue(at)lamundial(dot)hn>, pgsql-general(at)postgresql(dot)org |
| Subject: | Re: Insert into sintax |
| Date: | 2004-08-05 23:29:27 |
| Message-ID: | 64EDC403A1417B4299488BAE87CA7CBF01CD0F0E@maricopa_xcng0 |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
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(at)lamundial(dot)hn]
Sent: Thursday, August 05, 2004 3:50 PM
To: pgsql-general(at)postgresql(dot)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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2004-08-06 00:03:04 | Re: Sequence Question DOH! |
| Previous Message | Doug McNaught | 2004-08-05 23:03:24 | Re: Insert into sintax |