sqlinst = " insert into wkly_sum ( 字段1,字段2,字段3,字段4,字段5,字段6,字段7,字段8,字段9,字段10,字段11,字段12,字段13,字段14,字段15,字段16,字段17,字段18,字段19,字段20,字段21,字段22,字段23,字段24,字段25,字段26,字段27,字段28,字段29,字段30,字段31,字段32,字段33,字段34,字段35,字段36 ) "
sqlinst = sqlinst & " select tableB.字段1,tableB.字段2,tableB.字段3,tableB.字段4,tableB.字段5,tableB.字段6,tableB.字段7,tableB.字段8,sum(tableB.字段9) as z9 ,sum(tableB.字段10) as z10, sum(tableB.字段11) as z11 , sum(tableB.字段12) as z12 , sum(tableB.字段13) as z13, sum(tableB.字段14) as z14, sum(tableB.字段15) as z15, sum(tableB.字段16) as z16, sum(tableB.字段17) as z17, sum(tableB.字段18) as z18, sum(tableB.字段19) as z19, sum(tableB.字段20) as z20, sum(tableB.字段21) as z21, sum(tableB.字段22) as z22, sum(tableB.字段23) as z23, sum(tableB.字段24) as z24, sum(tableB.字段25) as z25, sum(tableB.字段26) as z26, sum(tableB.字段27) as z27, sum(tableB.字段28) as z28, sum(tableB.字段29) as z29, sum(tableB.字段30) as z30, sum(tableB.字段31) as z31, sum(tableB.字段32) as z32,sum(tableB.字段33) as z33, sum(tableB.字段34) as z34, tableB.字段35,tableB.字段36 from wkly group by tableB.字段3 "
Debug.Print sqlinst
dbcur.Execute sqlinst
可却出错了
运行时错误 '3122'
you tried to execute a query that does not include the specified expression '字段1' as part of an aggregate funcation
以上的错误是因为什么呢
[此贴子已经被作者于2003-5-6 10:38:40编辑过]
|