COALESCE with ELSE error in CASE STATEMENT

Database
Enthusiast

COALESCE with ELSE error in CASE STATEMENT

Syntax error
Something needede between the else keyword and coalesce keyword
in below statement

select case
when cust_sys_cd='CI' then 'wholesale'
when cust_sys_cd='LT' then 'retail'
else coalesce(OS_CUST_SYS_cd,'xyz','abc')
end
from cust
2 REPLIES
Enthusiast

Re: COALESCE with ELSE error in CASE STATEMENT

jst givit a try! hope dis ll wrk!

select case
when cust_sys_cd='CI' then 'wholesale'
when cust_sys_cd='LT' then 'retail'
else (coalesce(OS_CUST_SYS_cd,'xyz','abc'))
end
from cust

Enthusiast

Re: COALESCE with ELSE error in CASE STATEMENT

thanks sarathy

its worked fine

rgds,