Quantcast
Channel: SQL Server Integration Services forum
Viewing all articles
Browse latest Browse all 24688

Execute SP in batches

$
0
0

Hi All,

I have couple of Store Procedures in SQL Server. 

Mostly a simple insert with selecting millions of rows from the base tables, and it is running daily in ware house.

How can i make this insert to work in batches, like dividing into chunks and then insert.

Select Many fields

from Mytable

Where  createdWhen >=DATEADD(month, -24, GETDATE());

My querry looks something like this. and it is used to truncate and insert everyday.

Please help me on this 

   


Dilip Patil..


Viewing all articles
Browse latest Browse all 24688

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>