September 11, 2008 at 6:24 pm
I have a column called DETAIL. The records for the DETAIL column are 'Primary', 'Secondary', 'Territory'. I want to derive a column DETAIL_CONV from DETAIL where Primary = 2, Secondary = 1, Territory = 0.5 .
My DETAIL column has varchar datatype values and DETAIL_CONV should have numeric values. How can I perform this in SSIS ?
September 11, 2008 at 7:02 pm
You can used the Derived Column Transform with nested IF conditionals something like this:
DETAIL == "Primary" ? 2 : DETAIL == "Secondary" ? 1 : DETAIL == "Territory" ? 0.5 : 0
And select the appropriate data type. I don't have SSIS in front of me right now, but this is the basic idea.
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply