Skip site navigation (1) Skip section navigation (2)

Re: SQL Query

From: Bruno Wolff III <bruno(at)wolff(dot)to>
To: beyaNet Consultancy <beyanet(at)ntlworld(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: SQL Query
Date: 2004-03-23 20:46:30
Message-ID: 20040323204630.GA30663@wolff.to (view raw or flat)
Thread:
Lists: pgsql-sql
On Tue, Mar 23, 2004 at 20:02:32 +0000,
  beyaNet Consultancy <beyanet(at)ntlworld(dot)com> wrote:
> Hi,
> I am trying to create a query which basically goes along the lines of:
> 
> INSERT INTO tableX ( COL1, COL2 ) VALUES ( x, y ) where COL1 !=x and 
> COL2 !=Y
> 
> So, insert a record into tableX where there is not already an existence 
> of COL1 and COL2
> 
> Can this be done as I have described or is there a more efficient way 
> to do this?
> 
> many thanks
> 
> Peter

Pretty much the same question was asked on the admin list (though this
list is more appropiate) earlier today. The answer I gave is at:
http://archives.postgresql.org/pgsql-admin/2004-03/msg00305.php

In response to

  • SQL Query at 2004-03-23 20:02:32 from beyaNet Consultancy

pgsql-sql by date

Next:From: Chester KustarzDate: 2004-03-23 21:13:39
Subject: move forward 0 from foo;
Previous:From: beyaNet ConsultancyDate: 2004-03-23 20:02:32
Subject: SQL Query

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group