Hello,
My SQL request looks like this :
->from Table(Name(varchar), Type(int))
select Name as col1,
case Type when 1 then '1' else '0' end as col2,
case Type when 2 then '1' else '0' end as col3,
case Type when 3 then '1' else '0' end as col4,
case Type when 4 then '1' else '0' end as col5,
case Type when 5 then '1' else '0' end as col6
from Table
where Name='100-724'
The 3 lines result is :
col1 col2 col3 col4 col5 col6
---------------- ---- ---- ---- ---- ----
100-724 0 0 0 0 1
100-724 0 0 1 0 0
100-724 1 0 0 0 0
How can I get col2,col4 & col6 bits on a unique results line ?
i.e :
col1 col2 col3 col4 col5 col6
---------------- ---- ---- ---- ---- ----
100-724 1 0 1 0 1
Thank you for your help.
My SQL request looks like this :
->from Table(Name(varchar), Type(int))
select Name as col1,
case Type when 1 then '1' else '0' end as col2,
case Type when 2 then '1' else '0' end as col3,
case Type when 3 then '1' else '0' end as col4,
case Type when 4 then '1' else '0' end as col5,
case Type when 5 then '1' else '0' end as col6
from Table
where Name='100-724'
The 3 lines result is :
col1 col2 col3 col4 col5 col6
---------------- ---- ---- ---- ---- ----
100-724 0 0 0 0 1
100-724 0 0 1 0 0
100-724 1 0 0 0 0
How can I get col2,col4 & col6 bits on a unique results line ?
i.e :
col1 col2 col3 col4 col5 col6
---------------- ---- ---- ---- ---- ----
100-724 1 0 1 0 1
Thank you for your help.