I have the following query:
SELECT
*,
CASE PORCENTAJE_CRUCE
WHEN PORCENTAJE_CRUCE >= 80.00 AND PORCENTAJE_CRUCE <= 85.99 THEN 2000
WHEN PORCENTAJE_CRUCE >= 86.00 AND PORCENTAJE_CRUCE <= 90.99 THEN 3000
WHEN PORCENTAJE_CRUCE >= 91.00 THEN 5000
ELSE 0
END AS PAGO_INCENTIVO
FROM #AR_PORCENTAJE
and the following error:
Incorrect syntax near '>'.
I guess the condition I'm putting after the WHEN
is incorrect, how would be the correct way to add these conditions after WHEN
?