Solved

SSIS Export to Excel

Posted on 2013-01-02
6
519 Views
Last Modified: 2016-02-10
I have 5 set of query

select * from Table1

select * from Table2

select * from Table3

select * from Table4

select * from Table5

At present, i export all the records to seperate spreadsheet. How to generate one excel file with multiple sheets for each set of query.

I can just copy and paste. On doing so, some TEXT Columns, Decimal COlumns are not properly copied. I feel it is safer to go through SQL Export to same excel file
0
Comment
Question by:chokka
  • 3
  • 3
6 Comments
 
LVL 39

Expert Comment

by:als315
ID: 38736693
You can use UNION query (if columns in all tables are same):
select * from Table1
UNION ALL
select * from Table2
UNION ALL
select * from Table3
UNION ALL
select * from Table4
UNION ALL
select * from Table5
0
 

Author Comment

by:chokka
ID: 38736703
This will result in one Sheet.

I want one excel file with multiple sheets like Tab Menu
0
 
LVL 39

Accepted Solution

by:
als315 earned 500 total points
ID: 38736784
Sorry, didn't read question carefully. Try this solution:
http://stackoverflow.com/questions/3891650/exporting-to-multiple-worksheets-using-ssis
0
The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

 

Author Comment

by:chokka
ID: 38738313
Unable to find  the solution.

If i am not wrong, using SSIS we will not be able to export multiple sheets or workbook on one spreadsheet.
0
 

Author Closing Comment

by:chokka
ID: 38738316
Not  the solution !!
0
 
LVL 39

Expert Comment

by:als315
ID: 38739123
If it is not a solution, you should not mark question as answered. Press Request attention and ask to set your comment #38738313 as an answer.
0

Featured Post

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
sql 2014,  lock limit 5 32
Deal with apostrophe in stored procedures 8 42
SQL Server Import/Error Wizard error 12 19
replace \ by - in select 4 21
My client sends data in an Excel file to me to load them into Staging database. The file contains many sheets that they have same structure. In this article, I would like to share the simple way to load data of multiple sheets by using SSIS.
Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question