SQL Server 集成服务左加入 [英] SQL Server Integration Service Left Join

查看:43
本文介绍了SQL Server 集成服务左加入的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在尝试将下一个 ACCESS 查询转换为 SSIS 数据流:

I've been trying translate the next ACCESS query into a SSIS data flow:

Insert into A.column1, A.column2..    
Select B.column1, B.column2, C.column1, C.column2    
from B left join C on B.column3 = C.column3    
Group by A.column#    
Having B.column# is null

直到现在我已经创建了下一个数据流

Until now I have created the next data flow

(Excel源和DB源)->合并连接->数据转换->条件拆分->数据库目标

但是当我尝试在 Merge Join 中插入查询时,出现下一条消息错误:

But when I try to insert the query in the Merge Join I am having the next message error:

必须在此转换的两个源上将 isSorted 属性设置为 True.

所以我转到属性窗口,但在属性列表中没有看到类似的内容.

So I go to the property window but I do not see nothing like this in the list of properties.

我该怎么做才能解决这个问题?或者更好,您知道在 SSIS 中执行此查询的最佳方法吗?

What can I do in order to fix this problem?, or even better, do you know a best way to do this query in SSIS?

推荐答案

IsSorted 属性位于源组件的输入和输出属性"选项卡中.您需要将其设置为 true,并通过选择该列并将 SortKeyPosition 属性设置为 1 来指定对结果进行排序的列.如果结果按多个列排序,则对另一列执行相同操作列:SortKeyPosition 是列在生成源组件的 SQL 的 ORDER BY 子句中出现的顺序的从 1 开始的列表.

The IsSorted property is in the Input and Output Properties tab of the Source Component. You will need to set it to true, and also specify which column the results are sorted on, by selecting that column and setting the SortKeyPosition property to 1. If the results are sorted by more than one column, you do the same for the other columns: The SortKeyPosition is a 1-based list of the order the columns appear in the ORDER BY clause of the SQL that generated your source component.

这篇关于SQL Server 集成服务左加入的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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