pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Bruno Wolff III <bruno@wolff.to>
To: beyaNet Consultancy <beyanet@ntlworld.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: SQL Query
Date: Tue, 23 Mar 2004 14:46:30 -0600
Message-ID: <20040323204630.GA30663@wolff.to> (raw)
In-Reply-To: <051D7AFC-7D05-11D8-AC21-0003938366A4@ntlworld.com>
References: <051D7AFC-7D05-11D8-AC21-0003938366A4@ntlworld.com>

On Tue, Mar 23, 2004 at 20:02:32 +0000,
  beyaNet Consultancy <beyanet@ntlworld.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



view thread (18+ messages)

Message-ID: <20040323204630.GA30663@wolff.to>
Permalink:  ../20040323204630.GA30663@wolff.to/
Also on:    postgresql.org/message-id/20040323204630.GA30663@wolff.to

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: bruno@wolff.to, beyanet@ntlworld.com
  Subject: Re: SQL Query
  In-Reply-To: <20040323204630.GA30663@wolff.to>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox