Re: Insert into sintax

From: Josué Maldonado <josue(at)lamundial(dot)hn>
To: Duane Lee - EGOVX <DLee(at)mail(dot)maricopa(dot)gov>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Insert into sintax
Date: 2004-08-06 15:28:53
Message-ID: 4113A3B5.5030400@lamundial.hn
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Duane,

El 05/08/2004 5:29 PM, Duane Lee - EGOVX en su mensaje escribio:
> What table is lnpedpk in - ped_cam? What table is ped_pk in - ped_pro and
> ped_cam?

lnPedPk is parameter pased to the function and it could be a fixed value
on the sql console too, ped_pk is common in both tables, I changed the
code to this and still get the same error

INSERT INTO ped_cam
(SELECT * from ped_pro where ped_pro.ped_pk=81178)
WHERE NOT EXISTS
(SELECT 1 FROM ped_cam WHERE ped_cam.ped_pk=81178);

Thanks,

--
Sinceramente,
Josué Maldonado.
"Deja que los perros ladren, Sancho, es señal que caminamos." -- Miguel
de Cervantes Saavedra.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Ron St-Pierre 2004-08-06 15:45:27 Re: New to Postgres
Previous Message Tom Lane 2004-08-06 14:54:52 Re: PostgreSQL 7.4.2 allows foreign key violation