在线等待一个数组的问题
数据库表a
字段名b ,b里数据为以 ", "区分的数组,有多少个 ", "不确定:1,4,6,7
变量c也是以 ", "区分的数组,有多少个 ", "不确定,c= "1,6,7 "
这时候我要分别列出a表里b字段,符合c中条件(b里包含1或6或7)的数据,这个代码怎么写?
Select * From [a] Where b=
------解决方案--------------------变量c也是以 ", "连接的字符串?????
Select * From [a] Where
cc = split(c, ", ")
for i = lbound(cc) to ubound(cc)
sql = sql & " instr( ', '+b+ ', ' , ', " & cc(i) & ", ' ) <> 0 "
if(i < ubound(cc)) sql = sql & " or "
next