How do I use NOT EXISTS effectively to insert a new row?
586244Jul 3 2007 — edited Jul 5 2007I'd like to insert a new record(with values fetched from a different database(DB2)) into an Oracle table only those that are not already there.
I've tried searching the forums & elsewhere...there are some SELECT examples etc...but nothing I could use. I am not that good with SQL...so any help is appreciated.
basically this is what i'd need - (mock sql...)
> insert into TABLE values(value1, value2 ...) only if not exists(select column1, column2 from TABLE where column1='value1' and column2='value2).
thanks for your time,
-Karthik.