Export tables to XLS

Please support our MS SQL advertiser: Intel Parallel Studio Home
Reply

Join Date: Mar 2006
Posts: 5
Reputation: soer is an unknown quantity at this point 
Solved Threads: 0
soer soer is offline Offline
Newbie Poster

Export tables to XLS

 
0
  #1
Aug 6th, 2008
Hi, Im running MSFT SQL Server Mgmt Studio 2005 and would like to export all the tables in a DB where the # of rows > 0. I would like to export all tables to individual XLS files. I've gone through BCP documentation to no avail. Is there a simple code that can just export all tables in a database (with # rows > 0) to individual XLS files? It should be noted that the tables I want to output to XLS are created dynamically by a script. So, I wont know the table names until after running said script and the code I'm asking for in this post should not require one to know the table names.

Thank you in advance for all helpful responses! Please let me know if I need to be more clear in my request.
Reply With Quote Quick reply to this message  
Join Date: Apr 2006
Posts: 143
Reputation: cutepinkbunnies is an unknown quantity at this point 
Solved Threads: 8
cutepinkbunnies's Avatar
cutepinkbunnies cutepinkbunnies is offline Offline
Junior Poster

Re: Export tables to XLS

 
0
  #2
Aug 11th, 2008
You can use SMO to look through each table in a given database and code SSIS to only export those that have a rowcount.

This kind of functionality is easy in theory but I'm not quite a SSIS ninja so it will take some work.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC