I've got a CASE
statement that works, but because I have to do it in SSIS, I am at a loss:
SELECT [BPCNUM_0], TYPE,
CASE
WHEN [TYPE]=1 THEN 'Normal'
WHEN [TYPE]=2 THEN 'Divers'
WHEN [TYPE]=3 THEN 'Intra-Société'
WHEN [TYPE]=4 THEN 'Prospect'
END AS TYPE
FROM table
As you can see, the case statement evaluates values in one column and renames them depending on what they are. when I tried this with SSIS, it didn't work
[TYPE] == 1 ? "Normal" : [TYPE] == 2 ? "Divers" : [TYPE] == 3 ? "Intra-Société" : [TYPE] == 4 ? "Prospect"
I tried also
[TYPE] == "1" ? "Normal" : [TYPE] == "2" ? "Divers" : [TYPE] == "3" ? "Intra-Société" : [TYPE] == "4" ? "Prospect"
but also it didn't work.