Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 SSIS and Import/Export (2005)
 Auto export 1000 lines at a time to different xls.

Author  Topic 

pvong
Yak Posting Veteran

58 Posts

Posted - 2011-01-31 : 23:08:34
I have a table with 36000 clients. I need to break them down to 1000 clients at a time in their own xls file. I could just export the whole thing and then manually do it but I was wondering if there was a way to do it in ssis where it will just auto give me how ever many xls files needed just as long as they are in 1000 each. I don't care what they are named. They can just be 1.xls 2.xls..etc.

Is this possible?

------------------------------
Using VS2010 / Learning in VB.Net / Win2008 R2 / SQL 2008 R2
Be kind to the newbies because you were once there.

ZZartin
Starting Member

30 Posts

Posted - 2011-02-01 : 13:33:38
You could probably set up something in SSIS to do this. You might be able to set up something with a for loop using expressions to rename the xls file each itoration and then use a select top 1000 from your table. However if this is a one time thing it would be faster to just export it and do it by hand.
Go to Top of Page

yadhu_cse
Constraint Violating Yak Guru

252 Posts

Posted - 2011-02-02 : 00:41:32
wrtite stored procedure to select
only 1ooo lines.

Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2011-02-02 : 09:09:30
or use this too

http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=49926

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -