I want to make a query with a case and decode in the same selection with different columns so that:
select NOMBRE,
case when DESDE >= 0000 THEN decode(DIA,'0','DOM','1','LUN','2','MAR','3','MIER','4','JUE','5','VIE','6','SAB','ALL','TODOS')
ELSE 'FALSO'as PLAN,
from CALENDARIO j
where SCRIPT like '%prueba%';
But it gives me a missing keyword error. Can this be done? Is there any more optimal way? Thanks