Re: Conditional SQL query - Mailing list pgsql-sql

From Indraneel Majumdar
Subject Re: Conditional SQL query
Date
Msg-id Pine.SGI.3.96.1001106021935.1002323B-100000@www.cdfd.org.in
Whole thread Raw
In response to Re: Conditional SQL query  (Indraneel Majumdar <indraneel@www.cdfd.org.in>)
List pgsql-sql
OK, I solved my own problems (Congrats ;-) Sorry for bothering the list.
This is what I'm doing:

INSERT INTO table SELECT x,x,x where (select count(*) from table where
col1='value')=0;

any suggestions?

thanks,
Indraneel

On Mon, 6 Nov 2000, Indraneel Majumdar wrote:

> Now I have one more problem. How do I insert only once if value does not
> exist? eg:
> 
> insert into table once select x,x,x where not col1='value'
> 

/************************************************************************.
# Indraneel Majumdar                  ¡  E-mail: indraneel@123india.com  #
# Bioinformatics Unit (EMBNET node),  ¡  URL: http://scorpius.iwarp.com  #
# Centre for DNA Fingerprinting and Diagnostics,                         #
# Hyderabad, India - 500076                                              #
`************************************************************************/



pgsql-sql by date:

Previous
From: "Cristóvão B. B. Dalla Costa"
Date:
Subject: Re: Conditional SQL query
Next
From: "Marc Rohloff"
Date:
Subject: Returning Recordsets from Stored-procs