pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: SG Edwards <s0460205@sms.ed.ac.uk>
To: pgsql-interfaces@postgresql.org
Subject: Check before insert
Date: Tue, 15 Mar 2005 21:07:43 +0000
Message-ID: <1110920863.42374e9f75aa1@sms.ed.ac.uk> (raw)



Hi,

I have a table as follows:

protein_id | name
___________ ______

P04667      Albumin
P45366      Lactoglobulin
....
etc

I have a perl script that will insert data into this table from a file
containing a list of protein_id and names. However, I only want to insert
proteins where they are not already present in the database. Is there a way to
do this using an SQL command?


Thanks




view thread (3+ messages)  latest in thread

Message-ID: <1110920863.42374e9f75aa1@sms.ed.ac.uk>
Permalink:  ../1110920863.42374e9f75aa1@sms.ed.ac.uk/
Also on:    postgresql.org/message-id/1110920863.42374e9f75aa1@sms.ed.ac.uk

 · 

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-interfaces@postgresql.org
  Cc: s0460205@sms.ed.ac.uk
  Subject: Re: Check before insert
  In-Reply-To: <1110920863.42374e9f75aa1@sms.ed.ac.uk>

* 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