sql中的sum和access中的sum的问题
用vb开发,在sql server中以下这句话可以正常执行:
insert into table1(col1,col2)
select table_day.col1,sum(case when table_day.col1= '" & timeK & "' then 1.0 else 0.0 end)/2 from table_day
where table_day.ID = '" & UserID & "'" & "and table_day.recID >= '" & rec1IDd & "'" & "and table_day.recID <= '" & rec1IDu & "'" & "and table_day.时间分类 = '" & timeK & "'" & "group by 时间分类"
但在access中却报错,错误信息如下:
语法错误(操作符丢失)在查询表达式'sum(case when table_day.col1= '1.1' then 1.0 else 0.0 end)/2'中。
请问该怎么解决这个问题?