On 09/05/2011 12:38 PM, 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...

anyone knows how do i can perfome this insert?

thanks

p

You can either do an Insert(...) select... from...where...

or you can add a rule to the table that checks if the key exists and if so, do an update or nothing instead.