加入多个条件 [英] join on multiple conditions

查看:76
本文介绍了加入多个条件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想加入不同条件的数据。例如,我有两个名为"t"的表。和"y"。我想在ssis上加入:

I want to join data on different conditions. for example I have two tables named "t" and "y". I want to do this join on ssis:

" select * from t left join y on(t.tel = y.tel或t.tel = y.mobile)and(t .mobile = y.tel或t.mobile = y.mobile )"

"select * from t left join y on (t.tel = y.tel or t.tel = y.mobile) and (t.mobile = y.tel or t.mobile = y.mobile)"

如何在ssis中加入?

推荐答案

嗨 

Hi 

在SSIS中,您可以使用合并加入来执行此操作。  SSIS基础:使用合并连接转换

In SSIS, you can do this with Merge Join. SSIS Basics: Using the Merge Join Transformation

要连接多个列,您需要在两个输入中对这些列进行排序。 

To join on multiple columns, you need to sort these columns fist, in both of the Input. 

并在合并连接中映射这些列。 

And map these columns in Merge join. 

参见; 

使用SSIS中的合并连接转换加入多个列


这篇关于加入多个条件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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