CREATE View [dbo].[OCRDFN2]
as
(
Select
CardName,
CardCode,
CardFName ,
CASE
when DebPayAcct = '_SYS00000000227' then '12700001-001'
when DebPayAcct = '_SYS00000000617' then '21180001-001'
when DebPayAcct = '_SYS00000000230' then '12700001-006'
when DebPayAcct = '_SYS00000000620' then '21180001-006'
when DebPayAcct = '_SYS00000000618' then '21180001-004'
when DebPayAcct = '_SYS00000000228' then '12700001-004'
when DebPayAcct = '_SYS00000000229' then '12700001-005'
when DebPayAcct = '_SYS00000000619' then '21180001-005'
End 'DebPaySeg',
CASE
when DebPayAcct = '_SYS00000000227' then 'Bangalore'
when DebPayAcct = '_SYS00000000617' then 'Bangalore'
when DebPayAcct = '_SYS00000000230' then 'Mumbai'
when DebPayAcct = '_SYS00000000620' then 'Mumbai'
when DebPayAcct = '_SYS00000000618' then 'Chennai'
when DebPayAcct = '_SYS00000000228' then 'Chennai'
when DebPayAcct = '_SYS00000000229' then 'Pune'
when DebPayAcct = '_SYS00000000619' then 'Pune'
End 'DebPay',
CASE
when Dpmclear = '_SYS00000000149' then '47000003-001'
when Dpmclear = '_SYS00000000621' then '21180002-001'
when Dpmclear = '_SYS00000000232' then '12700003-001'
when Dpmclear = '_SYS00000000624' then '21180002-006'
when Dpmclear = '_SYS00000000235' then '12700003-006'
when Dpmclear = '_SYS00000000233' then '12700003-004'
when Dpmclear = '_SYS00000000622' then '21180002-004'
when Dpmclear = '_SYS00000000623' then '21180002-005'
when Dpmclear = '_SYS00000000234' then '12700003-005'
End 'DebClearSeg',
CASE
when Dpmclear = '_SYS00000000149' then 'Bangalore'
when Dpmclear = '_SYS00000000621' then 'Bangalore'
when Dpmclear = '_SYS00000000232' then 'Bangalore'
when Dpmclear = '_SYS00000000624' then 'Mumbai'
when Dpmclear = '_SYS00000000235' then 'Mumbai'
when Dpmclear = '_SYS00000000233' then 'Chennai'
when Dpmclear = '_SYS00000000622' then 'Chennai'
when Dpmclear = '_SYS00000000623' then 'Pune'
when Dpmclear = '_SYS00000000234' then 'Pune'
End 'DebClear',
DebPayAcct , DpmClear from OCRD )
GO