QUESTION POSED ON: 09 May 2006 I have a single flat file source containing 1 million (changeable) rows. I want to generate multiple flat files, each containing 30,000 rows. The naming convention for the destination file could be anything as of now. The number of files to generate is not known at design time. Only the number of rows in each file is known. How do I divide my single file into multiple files, each containing 30,000 rows?
To continue reading for free, register below or login
Requires Membership to View
To read more you must become a member of SearchSQLServer.com
It's times like this that I miss some of my favorite Unix utilities. Unix supported the split command, which did exactly what you are looking for! You may want to consider creating a DTS package with the Custom Active Script task, in which you use the Scripting Runtime library's FileSystemObject to split a large text file into multiple small files.
Search and Browse the Expert Answer Center Search and browse more than 25,000 question and
answer pairs from more than 250 TechTarget industry experts.
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.