Friday, March 6, 2015

How to use direct select and insert or load to speedup the process instead of cursur

You need to use OUTPUT caluse for that


For every table you insert use OUTPUT clause and get generated id value + any other key columns to another table variable and use it in a join to populated the corresponding foreign key columns in the child table


See this as an example where I'm populating master child tables using a single XML document data


http://ift.tt/1nSL43s




Please Mark This As Answer if it solved your issue

Please Vote This As Helpful if it helps to solve your issue

Visakh

----------------------------

My Wiki User Page

My MSDN Page

My Personal Blog

My Facebook Page


No comments:

Post a Comment