Home > OS >  SSIS Conditional Split Error - The data type DT_BYTES cannot be used with binary operator "==&q
SSIS Conditional Split Error - The data type DT_BYTES cannot be used with binary operator "==&q

Time:11-23

While configuring a conditional split component with the following expression:

[VersionStamp_Source] == (DT_I8)[VersionStamp_Destination]

I am getting the following error:

The data type DT_BYTES cannot be used with binary operator "==".

Screenshot:

enter image description here

CodePudding user response:

As shown in the error message, one of the columns used in the conditional split expression has a data type of DT_BYTES which cannot be compared using binary operators.

You need to cast this column to another data type. As mentioned in the enter image description here

As @billinkc mentioned in the comments, casting DT_BYTES to a string data type is more preferable since some values cannot be converted to an 8-byte integer.

To solve your problem, try using the following expression:

    (DT_WSTR,255)[VersionStamp_Source] == (DT_WSTR,255)[VersionStamp_Destination]

Also, make sure to use an accurate length for the string casting operator. You can increase the string length to 4000

  • Related