I am getting this error message
missing keyword
Any suggestions? thanks
CASE WHEN
substr(M1.M_GL_LINE_NO,length(M1.M_GL_LINE_NO - 4),4)>=0
and substr(M1.M_GL_LINE_NO,length(M1.M_GL_LINE_NO - 4),4) < 4000
then 'ASSET'
ELSE CASE WHEN
substr(M1.M_GL_LINE_NO,length(M1.M_GL_LINE_NO - 4),4)>=4000
and substr(M1.M_GL_LINE_NO,length(M1.M_GL_LINE_NO - 4),4) < 8000
then 'LIABILITY'
ELSE CASE WHEN
substr(M1.M_GL_LINE_NO,length(M1.M_GL_LINE_NO - 4),4)>=8000
and substr(M1.M_GL_LINE_NO,length(M1.M_GL_LINE_NO - 4),4) < 9000
then 'OFF BALANCE SHEET ASSET'
ELSE CASE WHEN
substr(M1.M_GL_LINE_NO,length(M1.M_GL_LINE_NO - 4),4)>=9000
and substr(M1.M_GL_LINE_NO,length(M1.M_GL_LINE_NO - 4),4) < 10000
then 'OFF BALANCE SHEET LIABILITY' end as ASSET_TYPE,
I think you are using more "CASE" word in your case statement. Remove "ELSE CASE" after each "Then". Refer this Oracle Documentation
The general syntax will be