Assign Code Page in Conditional Expression

  • Heya All,

    SSIS 2008 R2

    My requirement is to assign a code page/data type of DT_STR in a Derived Column Transformations in a Conditional Expression.

    Specifics:

    - If field has a value, UPPER the text

    - If there is no value assign a string.

    The following expression data type turns out to be Unicode string (DT_WSTR)

    !ISNULL(Field) && Field != "" ? (DT_STR,50,1252)UPPER(Field) : (DT_STR,50,1252)"SOMETEXT"

    I have tried putting the (DT_STR,50,1252) in various places/combination and I can't get DT_STR

    Am I missing something or do I have to this in 2 steps, e.g. UPPER and then assign text for empty string

    Thanks

    Steve

  • Steve

    Have you specified DT_WSTR in the properties of the output column? Open the Advanced Editor for your Derived Column transformation, go to the Input and Output Properties tab and change Data Type (under Data Type Properties) to the desired type.

    John

  • Heya John,

    No I hadn't, I tend to forget about the Advanced Editor options.

    Thanks very much

    Steve

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply