22,206
社区成员
发帖
与我相关
我的任务
分享
select t1.*,
(select concat(concat(concat(concat(col1,col2),col3),col4),col5)
from ( select
case when bitand(T2.VERIREASON ,power(2,1)) = power(2,1) then '#1#,' else '' end col1,
case when bitand(T2.VERIREASON ,power(2,2)) = power(2,2) then '#2#,' else '' end col2,
case when bitand(T2.VERIREASON ,power(2,3)) = power(2,3) then '#3#,' else '' end col3,
case when bitand(T2.VERIREASON ,power(2,4)) = power(2,4) then '#4#,' else '' end col4,
case when bitand(T2.VERIREASON ,power(2,5)) = power(2,5) then '#5#' else '' end col5) ab) VERIREASON ,
FROM V_STUDENT T1
INNER JOIN GD_DATASENDER T2 ON T1.SIGNUPNO = T2.STUDENTCODE
try
concat(concat(concat(concat(col1,col2),col3),col4),col5)
-->
col1+col2+col3+col4+col5