What am I doing wrong in the below statement:
CASE
WHEN NOT CAST(CONVERT(nvarchar, DecryptByKey(a.[1003-Ref Salary])) as MONEY) > 0 THEN NULL
WHEN NOT c.Name IS NULL THEN (a.[PP salary-Comm] * CAST(y.[Annual Conversion] as money))
ELSE (CAST(CONVERT(nvarchar, DecryptByKey(a.[1003-Ref Salary])) as MONEY) * CAST(y.[Annual Conversion] as MONEY))
END,
Thanks a million!!
CASE
WHEN NOT CAST(CONVERT(nvarchar, DecryptByKey(a.[1003-Ref Salary])) as MONEY) > 0 THEN NULL
WHEN NOT c.Name IS NULL THEN (a.[PP salary-Comm] * CAST(y.[Annual Conversion] as money))
ELSE (CAST(CONVERT(nvarchar, DecryptByKey(a.[1003-Ref Salary])) as MONEY) * CAST(y.[Annual Conversion] as MONEY))
END,
Thanks a million!!