Home > Ask the SQL Server Experts > Archive: Integration Services Questions & Answers > Generating multiple flat files from a single flat file source
Ask The SQL Server Expert: Questions & Answers
EMAIL THIS

Generating multiple flat files from a single flat file source

Joe Toscano EXPERT RESPONSE FROM: Joe Toscano

Pose a Question
Other SQL Server Categories
Meet all SQL Server Experts
Become an Expert for this site


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


>
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?

>
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.


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   



RELATED CONTENT
Archive: Integration Services
How to convert DTS packages to SSIS and overwrite data
How to migrate DTS to SSIS and deploy SSIS packages
Query to search text in old DTS packages in SQL Server?
Error importing Excel data to SSIS in SQL Server 2005
Delete .bak files automatically with CLR
DTS package designed to overwrite extract.xls
Displaying a SQL Server database report in Excel
Stored procedure practices in SQL Server
Call triggers in a stored procedure
SQL Server permission to create jobs and schedules in SSIS

Microsoft SQL Server Database Development
Change tempdb from 'C' drive
Sub-queries supported in Analysis Services MDX
MDX functions: SCOPE, THIS and FREEZE
More powerful Analysis Services MDX in SQL Server 2005
Top 5 SQL Server query tips
Update table rows in SQL Server 2000
Delete .bak files automatically with CLR
Conversion error in SQL Server business objects
Syntax error in SQL Server script
Stored procedure overview in SQL Server
Microsoft SQL Server Database Development Research

SQL Server Interoperability
Utilize SSAS for data predictions and classification using Excel
How to create a SQL Server linked server to DB2
Export SQL Server data to an Excel file using SSIS and Visual Studio
Performance tuning for SQL Server 2005 and Exchange running on SBS
Custom VB.Net scripting in SQL Server Integration Services
Can SQL Server 2000 work on Windows 2003 platform?
Query to search text in old DTS packages in SQL Server?
Handle slowly changing dimensions with SSIS 2005 wizard
Run DTS packages within SQL Server Integration Services
SQL Server Integration Services how-to

RELATED GLOSSARY TERMS
Terms from Whatis.com − the technology online dictionary
CORBA  (SearchSQLServer.com)

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary



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.
Browse our Expert Advice



SQL Solutions - SQL Database Design
HomeNewsTopicsITKnowledge ExchangeTipsAsk the ExpertsMultimediaWhite PapersIT Downloads
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
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.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 2005 - 2009, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts