Here's an expression for a derived column "ReplaceWeight"
LEN(TRIM(Weight)) == 0 ? (DT_STR,50,1252)NULL(DT_STR,50,1252) : (DT_STR,50,1252)Weight
I'm unclear about the syntax of the True portion of this IF statement...
I read this as "If the length of the trimmed column 'Weight' is zero, assign the derived column ReplaceWeight the a NULL value of type string?? ELSE convert the Weight column to a string and assign this value to the derived column"
The expression builder shows me that
NULL(DT_STR,50,1252)
...returns a NULL value of the specified data type, DT_STR. This is a little weird to me, since I am used to NULL being a value that database columns of various types.
Am I to interpret that the following means "convert the null value of a STRING data type to a STRING data type?"
(DT_STR,50,1252)NULL(DT_STR,50,1252)
I would've thought this to be valid:
LEN(TRIM(Weight)) == 0 ? NULL : (DT_STR,50,1252)Weight
Am I interpreting this code propertly?