Derived Column

  • :angry::sick: I have a derived column transformation. The input values are Intergers, but I need the output to be string. If it was just an explicit data type change I could do this with just doing

    (DT_WSTR,100) (MyColumn)

    But I also need the derived column for expressions such as this:

    MyColumn == 1 ? "Something" : "SomethingElse"

    Can I do this with just 1 Derived Column transformation? Or do I need to use another transformation as well?

  • Khades (3/2/2011)


    :angry::sick: I have a derived column transformation. The input values are Intergers, but I need the output to be string. If it was just an explicit data type change I could do this with just doing

    (DT_WSTR,100) (MyColumn)

    But I also need the derived column for expressions such as this:

    MyColumn == 1 ? "Something" : "SomethingElse"

    Can I do this with just 1 Derived Column transformation? Or do I need to use another transformation as well?

    Why not use 1 derived column and MyColumn == "1" ? "Something" : "SomethingElse" ?



    Alvin Ramard
    Memphis PASS Chapter[/url]

    All my SSC forum answers come with a money back guarantee. If you didn't like the answer then I'll gladly refund what you paid for it.

    For best practices on asking questions, please read the following article: Forum Etiquette: How to post data/code on a forum to get the best help[/url]

  • The value coming is not a string, is an interger. It gives me a data conversion error.

  • Give your derived column a different name than your original column, then you'll have both values available.



    Alvin Ramard
    Memphis PASS Chapter[/url]

    All my SSC forum answers come with a money back guarantee. If you didn't like the answer then I'll gladly refund what you paid for it.

    For best practices on asking questions, please read the following article: Forum Etiquette: How to post data/code on a forum to get the best help[/url]

  • Ah ok, great thanks!

Viewing 5 posts - 1 through 4 (of 4 total)

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