Export into CSV using DTS
Hi, I'm creating DTS package in SQL 2000. The package exports the records from table into CSV. The table has total 2.34 Crores and i would like to know is there any way creating multiple files having 10 lakhs in each CSV with different file name. Lets say my csv filename is testing.csv The package need to save the first 10,000,00 records testing1.csv and next 10,000,00 records testing2.csv Alternative approach is also fine. Please let me know your thoughts. Thanks Best Regards, Venkat
June 6th, 2012 3:32am

You need to write t_sql to page for 10,000,000 and then have a arrow to import to the file... Hmm, I think you will need to have as much .txt files as you have batches. BTW, do not import a 10 mln rows as one batch but divide into small chunks.Best Regards, Uri Dimant SQL Server MVP http://dimantdatabasesolutions.blogspot.com/ http://sqlblog.com/blogs/uri_dimant/
Free Windows Admin Tool Kit Click here and download it now
June 6th, 2012 4:30am

Hi, I am just pusing data from a table to csv file. I am not using any query. Can you please be little more specific and let me know how this can be acheived?Best Regards, Venkat
June 6th, 2012 7:12am

Do you have any licensed installations of SSIS in the environment? DTS shouldn't be used if you do. If not, use the export wizard and save the DTS package (if I remember it's ability to do so correctly). Then work from there. You also asked for an alternative which would be bcp and it probably your better performance factor and setup option in a 2K world if no transformations are needed to a certain level. Ted Krueger Blog on lessthandot.com @onpnt on twitter Troubleshooting SQL Server: A Guide for the Accidental DBA Please click the Mark as Answer button if a post solves your problem!
Free Windows Admin Tool Kit Click here and download it now
June 6th, 2012 8:16am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics