Quantcast
Channel: Forum Getting started with SQL Server
Viewing all articles
Browse latest Browse all 4729

CASE STATEMENT values should be two times

$
0
0

HI

SELECT CASE
             WHEN IND =1 THEN 'NEW'
             WHEN IND =2 THEN 'OLD'
             WHEN IND =3 THEN 'LL'
             WHEN IND  in(1,2,3,4,5,6) AND BP_ID =4 THEN 'BP 4 REL'

             END)
             FROM TABLE1

If case is statify by out is below like(Expiating)

NEW

OLD

LL

BP 4 REL

please any body help

above query display my system only LL and 'BP 4 REL'

Thanks

Revathi


Viewing all articles
Browse latest Browse all 4729

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>