Could you help with this one?
In the case statement below i an getting only data for the first two case statement, and the last 3 statements are suppressed.
But when i put the second case statement in the end(i.e 'Total FEW') i am getting value for the first four condition and only the 'Total FEW' condition is suppressed.
Pls give a advise/solution!
Case
When T2.A = 'CANADA'
and T2.B in ('TRANSACTION FRAUD', 'IDENTITY FRAUD',
'INVESTIGATIONS')
Then 'Canada'
When T2.B <> 'OTHER'
Then 'Total FEW'
When T2.A in ('BANK CARD EAST', 'BANK CARD WEST',
'CANADA', 'CHOICE', 'DEBIT', 'DEBIT EAST',
'DEBIT WEST', 'OTHER')
and T2.B in ('SMITH BARNEY', 'SPECIALTY',
'BOARDROOM', 'DOSS')
Then 'DOSS'
When T2.A in ('BANK CARD EAST', 'BANK CARD WEST',
'CHOICE', 'CANADA', 'OTHER')
and T2.B = 'IDENTITY FRAUD'
Then 'ID Fraud'
When T2.A in ('BANK CARD EAST', 'BANK CARD WEST',
'CHOICE', 'OTHER')
and T2.B = 'TRANSACTION FRAUD'
Then 'Trans Fraud'
End Department,
Submitted under:
Microsoft SQL Server · TSQL · · ·