Derived Editor Casting

  • Hi,

    What I would like to do is change the data type a column [DefinitionCategoryID] to NUMERIC when it is equal to 1 and to VARCHAR when it is equal to 2.

    I don't mind which task accomplishes this but I am trying to use the derived editor and have this code which obivously doesn't work;

    ([DefinitionCategoryID] == "1" ? (DT_NUMERIC)[DefinitionCategoryID] : [DefinitionCategoryID] == "2" ? (VARCHAR)[DefinitionCategoryID])

    Can the derived editor do this or is there a better way?

    Thanks

  • I am afraid you cannot do this with SSIS. Each column on the data flow can only have one data type. You are trying to use 2 data types for the column and SSIS is going to get very unhappy with this.

    What is it that you are trying to achieve ?

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

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