Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Import/Export (DTS) and Replication (2000)
 BCP queryout batches into multiple XLS/CSV files.

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2002-05-14 : 10:46:07
Tathagatarr writes "I have a data that comes from a view with no PK I need to BCP out that data into multiple XLS/CSV files with different names for each 10,000 records. I also would like to have programitically create a new XLS/CSV file if there is more than 10,000 records. For example if I am BCP 'ing out 50,001 records I want to have 6 xls/csv files. 5 with 10,000 each and the 6th one with 1record. Please let me know how I could automate whole thing and run as a SQL job everyday."

Page47
Master Smack Fu Yak Hacker

2878 Posts

Posted - 2002-05-14 : 11:49:33
use the same tricks you would use to page a recordset. search this site for paging . . .

here is a good place to start.

<O>
Go to Top of Page
   

- Advertisement -