I have an excel sheet template that has 3 columns. I also have a SQL server table that has the same 3 columns plus an additional 4th column. I need to import all 4 columns from the SQL table into the excel spreed sheet template. My problem is that when I try to MAP the columns in SSIS I can only map the 3 columns that the Table and excel sheet have in common. How can I have SSIS import all 4 columns and not just the 3 columns that the source and destination have in common? Is there a way I can have SSIS add the additional field column to my excel spread sheet destination?
Sql-server – SSIS Adding column to excel sheet template destination when importing from SQL Table Source
excelsql serversql-server-2008-r2ssis
Related Question
- Sql-server – SQL import data when both source and destination has data and identity column
- Sql-server – SQL ssis delete imported rows from source table
- Sql-server – Importing from Excel
- Sql-server – Adding Image to excel Export in SSIS
- Sql-server – I gave 3 large Excel files need to be loaded in Single SQL table
Best Answer
When you do Export data from the database (using the wizard - Import\Export)
select -- write a query to specify data transfer.
If you are creating package from scratch using BIDS, then in the execute sql task editor, in the sql statement
then in the data flow task in the source query specify T-SQL query as below :