Re: Insert into sintax - Mailing list pgsql-general

From Duane Lee - EGOVX
Subject Re: Insert into sintax
Date
Msg-id 64EDC403A1417B4299488BAE87CA7CBF01CD0F0E@maricopa_xcng0
Whole thread Raw
In response to Insert into sintax  (Josué Maldonado <josue@lamundial.hn>)
Responses Re: Insert into sintax
List 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@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

pgsql-general by date:

Previous
From: Doug McNaught
Date:
Subject: Re: Insert into sintax
Next
From: Tom Lane
Date:
Subject: Re: Sequence Question DOH!