sql &= strUnion
for i=i to num
sql &= "select 2+i*3,6+i*3"
sql &= " from A"
next
strUnion = " union "
为什么出现的结果是 select 2+i*3,6+i*3 from A union select 2+i*3,6+i*3 from A
而不是我想要的结果 5 9
7 12
哪为大虾指点下,先谢了
...全文
265打赏收藏
for循环没有执行
num=2 sql &= strUnion for i=i to num sql &= "select 2+i*3,6+i*3" sql &= " from A" next strUnion = " union " 为什么出现的结果是 select 2+i*3,6+i*3 from A union select 2+i*3,6+i*3 from A 而不是我想要的结果 5 9 7 12 哪为大虾指点下,先谢了
这样用对吗?
sql &= strUnion
for i=i to num
sql &= "select 2+i*3,6+i*3"
sql &= " from A"
next
strUnion = " union "
////
sql &= strUnion
for i=i to num
sql &= "select "&2+i*3&","&6+i*3&"
sql &= " from A"
next
strUnion = " union "