pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: beyaNet Consultancy <beyanet@ntlworld.com>
To: pgsql-sql@postgresql.org
Subject: SQL Query
Date: Tue, 23 Mar 2004 20:02:32 +0000
Message-ID: <051D7AFC-7D05-11D8-AC21-0003938366A4@ntlworld.com> (raw)

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

view thread (18+ messages)  latest in thread

Message-ID: <051D7AFC-7D05-11D8-AC21-0003938366A4@ntlworld.com>
Permalink:  ../051D7AFC-7D05-11D8-AC21-0003938366A4@ntlworld.com/
Also on:    postgresql.org/message-id/051D7AFC-7D05-11D8-AC21-0003938366A4@ntlworld.com

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: beyanet@ntlworld.com
  Subject: Re: SQL Query
  In-Reply-To: <051D7AFC-7D05-11D8-AC21-0003938366A4@ntlworld.com>
  References: <051D7AFC-7D05-11D8-AC21-0003938366A4@ntlworld.com>

* 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