Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Suggested Design for Multi-File Export to Tab Delimited ...

Suggested Design for Multi-File Export to Tab Delimited ...

Suggested Design for Multi-File Export to Tab Delimited ...

I have a request to split an existing text file output directly from a table into separate files in groups of 10k records.  I already have a rowid (identity) in the table, now I am struggling with how to design a DTS to accomplish task.  The table which presently feeds the existing single output text file; has ~60k rows.  But, this can be dynamic and we may have 100K rows next month.  The whole reason for this 10k per file is to accomodate another program which can appearently only run 10k records per modeling run.  I plan to store the 10K max records per text file in a default lookup table; since it may change.  Any design thoughts appreciated.   

Steve Medvid
IT Consultant & Web Master

Chester County, PA Residents
Please Show Your Support...

RE: Suggested Design for Multi-File Export to Tab Delimited ...

Hmmm, perhaps your best bet would be to write a looping package that's driven by your row identifier?

your source query could be something like:


select top 10000 *
from daTable
where rowid > ?
order by rowid asc

where the parameter is the last row id processed the last time through (you should be able to store it in a variable).

You could use a second variable to store the output file name, something like output_1, output_2, etc....

For a quick rundown of looping, take a look at this:  http://www.sqldts.com/246.aspx

Hope this helps,


----signature below----
The author of the monograph, a native of Schenectady, New York, was said by some to have had the highest I.Q. of all the war criminals who were made to face a death by hanging. So it goes.

My Crummy Web Page

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close