Hello Team , i am trying to run the below query but it gives me error as mismatch any idea what i am doing wrong.
SELECT
*
FROM
"chat_comment" c1
where
(c1."createdDate" >= '2019-08-27'
AND c1."createdDate" <= '2019-08-28')
AND case when c1.divisionId=63 then 'SA Production' else 'Admin' end = 'SA Production'
Error: 14:22:20 FAILED [SELECT - 0 rows, 0.019 secs] [Code: 0, SQL State: ] line 8:10: mismatched input 'when' expecting {, 'AND', 'BETWEEN', 'GROUP', 'HAVING', 'IN', 'IS', 'LIKE', 'LIMIT', 'NOT', 'OR', 'ORDER', 'RLIKE', '{LIMIT', '=', '<=>', NEQ, '<', '<=', '>', '>=', '+', '-', '*', '/', '%'}
SELECT
*
FROM
"chat_comment" c1
where
(c1."createdDate" >= '2019-08-27'
AND c1."createdDate" <= '2019-08-28')
AND case when c1.divisionId=63 then 'SA Production' else 'Admin' end = 'SA Production';
Thanks,
Navjeet