Not able to insert merge values in one row using s

2019-05-31 22:32发布

I have two excel source on one excel file 1st fetching value date and 2nd fetching value price now i have tried merge then union all also to get those two values in one derived column but when i execute my package it is inserting values separately. like this into two rows one by one but i want to insert these two values in one row only.

for example this is my problem:

date price
12-12-2001 null

date price
null 54

but i want it in one row only like

date price
12-12-2001 54

enter image description here

标签: ssis
1条回答
三岁会撩人
2楼-- · 2019-05-31 23:33

Create two derived columns with the same value (i.e. call them id1 and id2 and set both to have a value of 1).

Change the sort to sort by the new id columns.

Change the merge component to a merge join and use the newly created ids to link the data based on an inner join

SSIS Merge Join

which will give you a single row

Data flow for single row

查看更多
登录 后发表回答