Derived Column Failing due to truncation

Good afternoon,

I have a derived column which performs a very simple task of checking if a value matches or not and inserts a 0 for match, and a 1 for no match. The purpose is to identify which fields will ultimately need to be updated.

Here is a sample of the expression:

ISNULL(SOMEDATE) ? 0 : SOMEDATE== REPLACENULL(origSOMEDATE,"<NULL>") ? 0 : 1

The dataype is DT_I4, and the result should either be a 0 or a 1, so I'm confused as to how value is being truncated. Both dates are in the same format. I used a convert to convert both dates to datetime2(7). When I set the column to ignore truncation warning, the package works as intended. Any ideas?

July 2nd, 2015 5:36pm

Hi TA41747,

what value truncated?

You cannot compare a date to "<NULL>"

Free Windows Admin Tool Kit Click here and download it now
July 2nd, 2015 10:14pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics