Hi
I have a problem where I must compair an import table with a local datatable and import rows that are missing and correct the rows that are different.
How to best do this?
I was hoping to avoid cursors
thanks
Walter
hi
what is simple is just refer to the database
and get the rows from current db and insert the sam in target database
use not in clause in source Db so u can take out the duplicates
I hope u ll be geting it right
TechiTawa|||walter_verhoeven wrote:
Hi
I have a problem where I must compair an import table with a local datatable and import rows that are missing and correct the rows that are different.
How to best do this?
I was hoping to avoid cursors
thanks
Walter
you need an upsert (update /insert) statement
unfortunately upsert is not a supported keyowrd in sql server right now but
there are work around.
see this links
http://sudheerpalyam.spaces.live.com/Blog/cns!1pKCMhBsSwPMevqFfdi-3JgQ!198.entry
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=58353
No comments:
Post a Comment