Case statement syntax error

Hi, can anyone help me? I can´t finde the syntax error

SELECT *
CASE
WHEN tmix =< 20 THEN ‘Top’
WHEN tmix BETWEEN 18.5 AND 24.9 THEN ‘Normal’
WHEN tmix BETWEEN 25 AND 29.9 THEN ‘Low’
WHEN tmix => 30 THEN ‘Red flag’
FROM reaction,
END AS weight;

it keeps showing me:
Execution finished with errors.
Result: near “CASE”: syntax error
At line 1:
SELECT *
CASE

Hi, try changing the order of “equal or smaller than” to “smaller than or equal” (<=)
Same for “larger than or equal”.

hi, thanks por answer, I´ve just done it, but it is still giving the same error:
Execution finished with errors.

Result: near “CASE”: syntax error

At line 1:

SELECT *

CASE

Also switch the order of END and FROM: The CASE stuff should only contain the conditions and end after that.

1 Like

I was skiping the comma after the asterisk!!!
Finally!

1 Like

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.