Derived Column using Variable

Hi,

I have a requirement to derive month value from the variable.

The variable 'carInputMonth' holds the values 01 or 02 or 03 ...12 based on the input parameter.

My requirement is to load the target file with Month column and the value should be 'Jan', 'Feb',..'Dec'. So I have to derive the month name from month number.. I though to write a case statement in the derived column but it is not working for me. Please advise.

Thanks.

February 3rd, 2015 9:59am

Please share the code

the SSIS expression needs to chained like

carInputMonth == "01" ? "Jan" : carInputMonth == "02" ? : "Feb" : etc

Free Windows Admin Tool Kit Click here and download it now
February 3rd, 2015 10:09am

Hi Arthur,

I have already tried and it is not working.

@(User::varInputMonth) == "01" ? "Jan0"

The expression is in red colour only.

February 3rd, 2015 10:13am

Hi Arthur,

I have already tried and it is not working.

@(User::varInputMonth) == "01" ? "Jan0"

The expression is in red colour only.

syntax is wrong 

It should be this

(@[User::varInputMonth] == "01"? "Jan" : (@[User::varInputMonth] == "02" ? "Feb" : (...)))

Free Windows Admin Tool Kit Click here and download it now
February 3rd, 2015 10:42am

Hi Visakh,

I have tried both below syntax but no luck.

(@(User::varInputMonth) == "01" ? "Jan0")

(@[User::varInputMonth] == "01" ? "Jan0")

Can you please check and confirm.

Thanks.

February 4th, 2015 4:45am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics