| From: | Indraneel Majumdar <indraneel(at)www(dot)cdfd(dot)org(dot)in> |
|---|---|
| To: | pgsql-sql(at)postgresql(dot)org |
| Subject: | Conditional SQL query |
| Date: | 2000-11-05 19:03:31 |
| Message-ID: | Pine.SGI.3.96.1001105105556.902905A-100000@www.cdfd.org.in |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-sql |
Hi,
how can I insert a record after checking whether one of the fields has a
certain value or not? eg:
if table(col1)='value' insert into table values (x,x,x)
I am using perl interface. Is there any way to define a function to take
table name as an argument? (eg: select * from $table) I tried but this
gave an error (so I'm using perl to pass the real tablename for each
query)
Any help will be great,
Indraneel
/************************************************************************.
# Indraneel Majumdar ¡ E-mail: indraneel(at)123india(dot)com #
# Bioinformatics Unit (EMBNET node), ¡ URL: http://scorpius.iwarp.com #
# Centre for DNA Fingerprinting and Diagnostics, #
# Hyderabad, India - 500076 #
`************************************************************************/
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Cristóvão B. B. Dalla Costa | 2000-11-05 21:46:07 | Re: Conditional SQL query |
| Previous Message | Jean-Christophe Boggio | 2000-11-05 18:03:28 | Help with GROUP BY |