Quantcast
Channel: SCN : Unanswered Discussions - Data Services and Data Quality
Viewing all articles
Browse latest Browse all 3719

Convert nested Case to Decode or Ifthenelse

$
0
0

Hi Experts, I have a nested Case Statement, I want to Convert it into Decode or IFthenelse as below Case     when xxxx.aaaa ='A' and zzzz.bbbb is NULL then       Case           when xxxx.fffff in ('22','25') and xxxx.aaaa ='A' then 'Repay'           When xxxx.fffff in ('00','02','08','09') and xxxx.aaaa ='A' then 'Forbearance'       end     Else       Case           When (zzzz.bbbb is not NULL and zzzz.cccc='L74') or xxxx.aaaa ='A'  Then               Case                 When zzzz.ssss='MODIF' and zzzz.cccc in ('L23','M22','M23','M24','M25') and zzzz.bbbb is not NULL Then 'STRLN_MDFC'                 When zzzz.ssss='MODIF' and zzzz.cccc in ('M04') and zzzz.bbbb is not NULL Then 'HAMP Mod'                 When zzzz.ssss='MODIF' and zzzz.cccc in ('M04') and zzzz.bbbb is NULL Then 'FNMA Mod'                 When zzzz.ssss='DLIEU' Then 'Deed In Lieu'                 When zzzz.ssss='SSALE' Then 'Short Sale'                 When zzzz.ssss='PAYPL' Then 'Repay'                 When zzzz.ssss='LOSMI' Then 'Financial Solicitation'               End         End End 'gggggggggggggg' Any Suggesions Please Thanks


Viewing all articles
Browse latest Browse all 3719

Trending Articles