views:

25

answers:

2

hi

i have this table:

num | class | Prob

----------------------

1      |     2    |  1 

99    |     4    |  2 

2      |     5    |  3 

99    |     6    |  4 

where Prob = 99 i need * else i need to leave empty

num | class | Prob

----------------------

         |     2    |  1 

*       |     4    |  2 

         |     5    |  3 

*       |     6    |  4 

thank's in advance

A: 
select case when num = 99 then '*' else '' end num, class, Prob
from (
select 1 num,2 class, 1 Prob union all
select 99,4,2  union all
select 2,5,3  union all
select 99,6,4 ) t
Denis Valeev
A: 

Try this -

select case when num = 99 then '*' else '' end,
       class, prob from table
Sachin Shanbhag
thank's !! it work's !!
Gold
Somebody downvoted this one, can that somebody explain why?
Sachin Shanbhag