Ajan Balakumaran
Ajan Balakumaran

Reputation: 1649

How to merge two rows in SSIS Excel SQL Command

I have a table in the middle of an excel sheet. The table is given below, here the header is defined in two rows so I need to capture both of them together.

For an example the header for the second column has to be Management JG8

enter image description here

For this purpose I'm using the SQL command option in SSIS and I executed the following query and the output is shown below.

SELECT * FROM [Monthly SSC Report$W7:AJ31]

The headers are not what I'm expecting, I require assistance in modifying the sql query to get the header by merging those two rows.

enter image description here

Upvotes: 0

Views: 330

Answers (1)

Gary Mendonca
Gary Mendonca

Reputation: 2183

  1. Connect your Excel file normally to the Source Data Flow

  2. Your Source data should look like this:

enter image description here

  1. In the Excel Source Editor, Rename the required columns. For Example:

enter image description here

  1. To ignore the first row., add a conditional split that filters rows with Grand Total = NULL.

Upvotes: 1

Related Questions