How to switch sql-2005 Select Case When T-sql Naming?

Posted by soe on Stack Overflow See other posts from Stack Overflow or by soe
Published on 2008-12-23T09:37:40Z Indexed on 2012/09/28 15:38 UTC
Read the original article Hit count: 212

Filed under:
|
|
|
select 
(Case Remark01
When 'l1' then type1
when 'l2' then type2
end) AS [?] --Remark .....want to switch name in here
from mytable

Example ....

select 
(Case level
When 'l1' then type1 ('l1' mean check constant string)
when 'l2' then type2(('l2' mean check constant string))
end) AS (Case when 'l1' then [type01] Else [type02])
from mytable
select level,type1,type2 from mytable

I using two program this mytable
one program is want to show menu only type1 only
one program is want to show menu only type2 only
I using one view using two program..

© Stack Overflow or respective owner

Related posts about sql

Related posts about sql-server