Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Oracle Miscellaneous > conditional ins...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 3 Topic 6866 of 6987
Post > Topic >>

conditional insert with values; insert into .. values(...) where not

by md <mardahl2000@[EMAIL PROTECTED] > Apr 29, 2008 at 08:08 AM

This is what I wish I could to do.

insert into table_x (a, b, c)
  values(1, 2, 3)
    where not exist (select * from table_x where a = 2);

Thank you.




additional info:
I've seen conditional inserts without values(....), as in

INSERT INTO clients
            (client_id, client_name, client_type)
   SELECT supplier_id, supplier_name, 'advertising'
     FROM suppliers
    WHERE NOT EXISTS (SELECT *
                        FROM clients
                       WHERE clients.client_id =
suppliers.supplier_id);




 3 Posts in Topic:
conditional insert with values; insert into .. values(...) where
md <mardahl2000@[EMAIL  2008-04-29 08:08:52 
Re: conditional insert with values; insert into .. values(...) w
Peter Nilsson <airia@[  2008-04-29 20:27:31 
Re: conditional insert with values; insert into .. values(...) w
Ed Prochak <edprochak@  2008-04-30 10:01:48 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan13V112 Sat Jul 5 5:20:49 CDT 2008.