ERROR: Operand should countain 1 column(s) - CASE WHEN... THEN

Asked

Viewed 21 times

0

I am trying to run this Mysql code to perform a company time Clusterization but is showing error 1241: Operand should contain 1 column(s) . Someone can support me?

SELECT 
*,
(case WHEN (vw_rol.Tempo_empresa <= 0,3) THEN "até 3 meses"
     WHEN (vw_rol.Tempo_empresa > 0,3) and (vw_rol.Tempo_empresa <= 0,5)THEN "de 4 a 5 meses"
     WHEN (vw_rol.Tempo_empresa > 0,5) and (vw_rol.Tempo_empresa <= 0,11)THEN "de 6 a 11 meses"
     WHEN (vw_rol.Tempo_empresa > 0,11) and (vw_rol.Tempo_empresa <= 3)THEN "de 1 a 2 anos"
     WHEN (vw_rol.Tempo_empresa >=3) and (vw_rol.Tempo_empresa < 7)THEN "de 3 a 6 anos"
     WHEN (vw_rol.Tempo_empresa >=7) and (vw_rol.Tempo_empresa < 11)THEN "de 7 a 10 anos"
     WHEN (vw_rol.Tempo_empresa >=11) and (vw_rol.Tempo_empresa < 16)THEN "de 11 a 15 anos"
     WHEN (vw_rol.Tempo_empresa >=16) and (vw_rol.Tempo_empresa < 21)THEN "de 16 a 20 anos"
     WHEN (vw_rol.Tempo_empresa >20) THEN "de 16 a 20 anos"
    else "" 
    end) as CLASSIFICACAO
 
from vw_rol
  • Syntax error. Swap the comma by a dot.

1 answer

1

The syntax of decimals is 0.5 and not 0,5. Change this in your query filters.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.