在vba 內 連到sql 的數據
需將gxmc 內包括",1," 的字串篩選填入t_01內, 但一直篩選不到
sql 語句
select zdh, gxmc ,
case gxmc when '%,1,' then sum(shul)
when ',1,' then sum(shul)
when ',1,%' then sum(shul)
when '%,1,%' then sum(shul)
end "T_01" ,
case gxmc when ',2,' then sum(shul) end "T_02"
from jjgzmxb
where zdh ='12330-01a'
group by zdh, gxmc