(ISNULL(ModuleLevelId) && !ISNULL(LEV_CODE)) || (!ISNULL(ModuleLevelId) && ISNULL(LEV_CODE)) || ((ISNULL(LEV_CODE) ? 0 - ModuleLevelId :(DT_I4)LEV_CODE) != ModuleLevelId)
I think you need to surround your third term:
(ISNULL(LEV_CODE) ? 0 - ModuleLevelId :(DT_I4)LEV_CODE) != ModuleLevelId
with(). I think the expression engine does not properly handle it as
((ISNULL(ModuleLevelId) && !ISNULL(LEV_CODE)) || (!ISNULL(ModuleLevelId) && ISNULL(LEV_CODE)) || (ISNULL(LEV_CODE) ? 0 - ModuleLevelId :(DT_I4)LEV_CODE)) != ModuleLevelId
or (Boolean || Boolean || INT)! = INT
when you want (Boolean || Boolean || Boolean)
Try the topmost code in this answer.
source share