I am having a spreadsheet which contains around 3000 records. I need to insert all these data to a new table. So in this case using batch insert mechanism is quite good.
So i tried a simple example ,
<cfquery datasource="cse">
insert into Names
values
<cfloop from="1" to="3000" index="i">
('#i#')
<cfif i LT 3000>, </cfif>
</cfloop>
</cfquery>
But as SQL Server 2008 only allows 1000 batch insert at a time I am getting error.
So how to make separate batches each containing 999 records at a time and can execute at a time?