Hope you're doing well. I need to compare the Length of two string variables inside an expression task in SSIS so that if they have the same length the package will execute the next step and if not it will stop I've implemented something like this so far but it won't work

The images show My expression task and the regular expression within the
task and the precedence constraint from the expression task to the next step

enter image description here

enter image description here

enter image description here

有帮助吗?

解决方案

I found the answer I Created a variable @[User::Process] with Boolean data type and I changed the Expression to this

@[User::Process] = (DT_BOOL)((DT_I4) LEN( @[User::FileFormat] )==LEN( @[User::ExcelName] ) ? 1: 0)

And Changed the precedence constraint of the expression task to This

enter image description here

许可以下: CC-BY-SA归因
不隶属于 dba.stackexchange
scroll top