无法使用 ssis 在一行中插入合并值? [英] Not able to insert merge values in one row using ssis?

查看:29
本文介绍了无法使用 ssis 在一行中插入合并值?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在一个excel文件上有两个excel源第一个取值date和第二个取值price现在我尝试了 merge 然后 union all 也将这两个值放在一个 派生列但是当我执行我的包时,它会分别插入值.像这样一一分为两行,但我只想将这两个值插入一行.

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.

例如这是我的问题:

日期价格
12-12-2001 空

日期价格
null 54

但我只希望它排成一排

日期价格
12-12-2001 54

推荐答案

创建两个具有相同值的派生列(即,将它们称为 id1 和 id2 并将它们的值都设置为 1).

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

将排序更改为按新的 id 列排序.

Change the sort to sort by the new id columns.

将合并组件更改为合并连接,并使用新创建的 id 链接基于内连接的数据

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

这会给你一行

这篇关于无法使用 ssis 在一行中插入合并值?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆