Consider the following statement in a Derived Column Transformation:
Derived Column Name:
EFFECTIVE_DATE
Expression:
TRIM([EFFECTIVE DATE]) == "" ? (DT_WSTR,255)NULL(DT_WSTR,255) : [EFFECTIVE DATE]
I read this as:
"If Trim of Effective Date is an empty string then assign EFFECTIVE_DATE NULL converted to a Unicode string of length 255. Otherise, assign EFFECTIVE DATE its current value."
I assume that this is what the code is doing, but I am confused about the syntax of the following:
(DT_WSTR,255)NULL(DT_WSTR,255)
I only expected:
(DT_WSTR,255)NULL
I thought that the leading (DT_WSTR,255) was a cast of the value that immediately follows, a NULL value. Why is there another (DT_WSTR,255) immeditely after. What I am missing?