Re: conditional insert

From: Raymond O'Donnell <rod(at)iol(dot)ie>
To: Pau Marc Muñoz Torres <paumarc(at)gmail(dot)com>
Cc: pgsql general <pgsql-general(at)postgresql(dot)org>
Subject: Re: conditional insert
Date: 2011-09-05 09:48:44
Message-ID: 4E649AFC.2060909@iol.ie
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 05/09/2011 10:38, Pau Marc Muñoz Torres wrote:
> Hi follk
>
> i trying to performe a conditional insert into a table, indeed, what
> i'm trying to do is not insert a record into the table if that record exist
>
> googleling i found something like
>
> insert into XX values (1,2,3) where not exist (select ....);
>
> but i'm having and error near where...
>

Shouldn't it be EXISTS, not EXIST?

Anyway, what is the error you're getting?

Ray.

--
Raymond O'Donnell :: Galway :: Ireland
rod(at)iol(dot)ie

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Thomas Kellerer 2011-09-05 09:51:17 Re: conditional insert
Previous Message Achilleas Mantzios 2011-09-05 09:45:13 Re: conditional insert