【发布时间】:2010-07-27 18:19:38
【问题描述】:
使用 SQL Server Integration Services (SSIS) 执行增量数据加载,比较要导入的行数据和现有行数据的哈希值。我正在使用这个:
http://ssismhash.codeplex.com/
创建用于比较的 SHA512 哈希。当尝试使用条件拆分任务(表达式为 NEW_HASH == OLD_HASH)比较数据库中的数据导入哈希和现有哈希时,输入表达式时出现以下错误:
The data type "DT_BYTES" cannot be used with binary operator "==". The type of one or both of the operands is not supported for the operation. To perform this operation, one or both operands need to be explicitly cast with a cast operator.
在比较之前尝试将每列转换为字符串 (DT_WSTR, 64) 会导致截断错误。
有没有更好的方法来做到这一点,还是我遗漏了一些小细节?
谢谢
【问题讨论】:
-
您是否尝试将其转换为 int?