I am using the following expression:
[TIMEPERIOD_ID]==1?"JANUARY":
[TIMEPERIOD_ID]==2?"FEBRUARY":
[TIMEPERIOD_ID]==3?"MARCH":
[TIMEPERIOD_ID]==4?"APRIL":
[TIMEPERIOD_ID]==5?"MAY":
[TIMEPERIOD_ID]==6?"JUNE":
[TIMEPERIOD_ID]==7?"JULY":
[TIMEPERIOD_ID]==8?"AUGUST":
[TIMEPERIOD_ID]==9?"SEPTEMBER":
[TIMEPERIOD_ID]==10?"OCTOBER":
[TIMEPERIOD_ID]==11?"NOVEMBER":
[TIMEPERIOD_ID]==12?"DECEMBER"
And it throws the following exception:
ERROR - The data types "DT_WSTR" and "DT_I4" are incompatible for binary operator "==". The operand types could not be implicitly cast into compatible types for the operation. To perform this operation, one or both operands need to be explicitly cast with a cast operator.
Any suggestions?
TIMEPERIOD_ID
is annvarchar
, but you are comparing it to anint
. – GSerg