Exporting a table into multiple text files based on rowsHi,<br/><br/>First of all, I'm very bad at SSIS and has hardly never used it, so bear with me.<br/><br/>I have this table, with about 8 million rows in SQL Server, and I would like to split it into four different text files, with about 2 million rows per file. I'm thinking conditional split, but I do not know how I can base the export on how many rows that is processed. Can anyone help me...? © 2009 Microsoft Corporation. All rights reserved.Fri, 19 Jun 2009 09:02:18 Zd34d4c5e-a8f1-4873-8760-c98d99080fc6http://social.msdn.microsoft.com/Forums/en-US/sqlintegrationservices/thread/d34d4c5e-a8f1-4873-8760-c98d99080fc6#d34d4c5e-a8f1-4873-8760-c98d99080fc6http://social.msdn.microsoft.com/Forums/en-US/sqlintegrationservices/thread/d34d4c5e-a8f1-4873-8760-c98d99080fc6#d34d4c5e-a8f1-4873-8760-c98d99080fc6Nilfonshttp://social.msdn.microsoft.com/Profile/en-US/?user=NilfonsExporting a table into multiple text files based on rowsHi,<br/><br/>First of all, I'm very bad at SSIS and has hardly never used it, so bear with me.<br/><br/>I have this table, with about 8 million rows in SQL Server, and I would like to split it into four different text files, with about 2 million rows per file. I'm thinking conditional split, but I do not know how I can base the export on how many rows that is processed. Can anyone help me...? Fri, 05 Jun 2009 13:48:28 Z2009-06-05T13:48:28Zhttp://social.msdn.microsoft.com/Forums/en-US/sqlintegrationservices/thread/d34d4c5e-a8f1-4873-8760-c98d99080fc6#ae0f3aaf-32e6-4600-85dc-e60c9923a424http://social.msdn.microsoft.com/Forums/en-US/sqlintegrationservices/thread/d34d4c5e-a8f1-4873-8760-c98d99080fc6#ae0f3aaf-32e6-4600-85dc-e60c9923a424Todd McDermidhttp://social.msdn.microsoft.com/Profile/en-US/?user=Todd%20McDermidExporting a table into multiple text files based on rowsIn order to do that, you'll need to add some kind of a row count to your extracted data.  You have a few choices:<br/><br/>1. The <a href="http://msdn.microsoft.com/en-us/library/ms176102.aspx">SQL RANK</a> function.<br/>2. A <a href="http://weblogs.sqlteam.com/jamesn/archive/2008/02/13/60509.aspx">Script component that will number your rows</a>.<br/>3. A <a href="http://ssisctc.codeplex.com/Wiki/View.aspx?title=Other Tasks and Components available from Konesans">custom Row Numbering component</a>.<br/><br/>Then you can Conditional Split your rows based on that row number.<hr class="sig"><a href="http://feeds.feedburner.com/~r/ToddMcdermidsBlog/~6/3"><img src="http://feeds.feedburner.com/ToddMcdermidsBlog.3.gif" alt="Todd McDermid's Blog" style="border:0"></a>Fri, 05 Jun 2009 18:02:02 Z2009-06-05T18:02:02Z