求:select ... from 表 循环
各位老师好!我想用for x=1 to 60
SELECT h1,h2,h3,n2 FROM 3d999个数,n1n2_111 WHERE n2=N2b INTO TABLE sn1n2_111
.......
........
endfor
的方法,将下面n1n2_111--n1n2_170共60个select语句循环。
但没有查到from后面的表可以用变量表示的例子,也没查到into table后面的表可以用变量表示的例子。
不知道这个想法是否可行,如可行,请老师帮助写出程序。
如不行就得另想办法了。
还请各位老师指导帮助。
下面是select语句排列
SELECT h1,h2,h3,n2 FROM 3d999个数,n1n2_111 WHERE n2=N2b INTO TABLE sn1n2_111
SELECT h1,h2,h3,n2 FROM 3d999个数,n1n2_112 WHERE n2=N2b INTO TABLE sn1n2_112
SELECT h1,h2,h3,n2 FROM 3d999个数,n1n2_113 WHERE n2=N2b INTO TABLE sn1n2_113
SELECT h1,h2,h3,n2 FROM 3d999个数,n1n2_114 WHERE n2=N2b INTO TABLE sn1n2_114
...............
...............
SELECT h1,h2,h3,n2 FROM 3d999个数,n1n2_166 WHERE n2=N2b INTO TABLE sn1n2_166
SELECT h1,h2,h3,n2 FROM 3d999个数,n1n2_167 WHERE n2=N2b INTO TABLE sn1n2_167
SELECT h1,h2,h3,n2 FROM 3d999个数,n1n2_168 WHERE n2=N2b INTO TABLE sn1n2_168
SELECT h1,h2,h3,n2 FROM 3d999个数,n1n2_169 WHERE n2=N2b INTO TABLE sn1n2_169
SELECT h1,h2,h3,n2 FROM 3d999个数,n1n2_170 WHERE n2=N2b INTO TABLE sn1n2_170
谢谢各位老师!