Reputation: 250
I'm trying to use an expression in a Derived Column Transformation and it won't change from red, below is my code and I'm sure I have it correct, yet it keeps failing on me, any ideas why please?
(DT_WSTR,100,1252)([CategoryName]==''16-24s'' ? ''1'' :([CategoryName] ==''Boys''? ''2'':
([CategoryName] == ''Girls'' ? ''3'' :([CategoryName] == ''Groups'' ? ''4'' : ''5''))))
Upvotes: 0
Views: 82
Reputation: 61211
You need double quotes, not singles. If you let your mouse over over .... somewhere in that dialog box, you should get the error message
(DT_WSTR,100,1252)([CategoryName]=="16-24s" ? "1" :([CategoryName] =="Boys"? "2":
([CategoryName] == "Girls" ? "3" :([CategoryName] == "Groups" ? "4" : "5"))))
Upvotes: 1