sql-server - ssis 合并连接转换左外连接,其中 col 为空

标签 sql-server sql-server-2008 join ssis

只是想询问 Merge Join Transformation left outside where Supplier.SupplierCode 为 null join 我有 2 个数据源我有这个 sql 脚本来使它成为 SSIS

SELECT Supplier.SupplierCode, Supplier.SupplierName, Supplier.Address, af.SupplierId, af.SupplierCode AS Expr4, af.SupplierName AS Expr5, af.Address AS Expr6, af.EffectiveDate, af.ExpirationDate, af.CurrentFlag,
af.Expr1, af.Expr2, af.Expr3
FROM Supplier LEFT OUTER JOIN
(SELECT DimSupplier.SupplierId, DimSupplier.SupplierCode, DimSupplier.SupplierName, DimSupplier.Address, DimSupplier.EffectiveDate, DimSupplier.ExpirationDate, DimSupplier.CurrentFlag,
Supplier.SupplierCode AS Expr1, Supplier.SupplierName AS Expr2, Supplier.Address AS Expr3
FROM DimSupplier LEFT OUTER JOIN
Supplier ON DimSupplier.SupplierCode = Supplier.SupplierCode) AS af ON Supplier.SupplierCode = af.SupplierCode
where Supplier.SupplierCode is null

首先,我将 sup 脚本制作成数据 OLE DB 源命令,并使用 Merge Join 作为左外部的转换来加入数据流。只是想问我如何在ssis中实现Supplier.SupplierCode为null的地方以及什么意思

Specify whether the transformation handles null values as equal to other nulls. NOTE: If null values are not treated as equal values, the transformation handles null values like the SQL Server Database Engine does.



它与 Supplier.SupplierCode 为 null 的地方相同吗?
更新我试图删除空值以将其插入我的目标表并删除微妙的内容

enter image description here
enter image description here

最佳答案

您可以使用条件拆分,如下例所示。

enter image description here

在条件拆分中,使用 ISNULL(Supplier.SupplierCode). .

我有一个建议,删除使用的两种排序,而是对 OLEDB 源数据进行排序,并使两个 OLEDB 源中的 issort = TRUE。

关于sql-server - ssis 合并连接转换左外连接,其中 col 为空,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26519995/

相关文章:

mysql - 划分count(*)条sql语句得到比率

SQL Server 2008 R2 计算字段问题

Sql Server Express 数据库大小限制

c# - LINQ 加入两个数据表

c - pthread join 真的暂停调用线程吗

php - 如何在没有静态 IP 的情况下远程访问本地 Web 或数据库服务器

PHP + MS SQL Server 字符编码

sql-server-2008 - 如何用 Reporting Services 表达式语言编写 if else 语句?

asp.net - 事后在 ASP.NET Web 应用程序中实现安全性

MySQL:查询 UNION,JOIN 有条件的 WHERE