Sunday, 15 February 2015

export - Add row to 'Break up a SQL Server 2008 query into batches' -


I have been able to export a flat file with the help of BCP.

Now I have to add one (or two) rows to each batch, it is necessary to "offset" the total amount of $ so that each batch is left to zero. For example, I have 2,501 records in the table, amounting to $ 100 in 2,500 and all are booked in # 70000 accounts so that the total is $ 250,000. The final record, # 2,501, is booked in the account of # 80000 and its value is ($ 250,000); Therefore, the total table balance

Since our new system allows batches of only 950 rows, I have to divide the output using the code given above. Works great, BTW but after carrying "Balance" to zero for each batch, I have to add one row to each batch, and in Set of Account (# 80000, for example).

I hope that it makes sense to any person!

"post -The text "itemprop =" text ">

It seems that after each batch you should enter a new record. And, another suggestion that you have posted, is using 'Insert in Table ... Selection ...', it is slower than 'Selection ... in the table' and 'Select in Table' automatically Will create a table for you. After successfully batch each batch, you can automatically drop the created table. You can also remember what you have done.

No comments:

Post a Comment