select count(packageid) from sbm_package
where createrid=21120 and createtime>to_date('2006-09-30','yyyy-mm-dd') and
subattributetypeid =70 and priattributetypeid=12
报ora-00937错误!!!!
是group by问题????????
这段sql语句在那里加group by?????????????????????
where createrid=21120 and createtime>to_date('2006-09-30','yyyy-mm-dd') and
subattributetypeid =70 and priattributetypeid=12
报ora-00937错误!!!!
是group by问题????????
这段sql语句在那里加group by?????????????????????
select count(packageid) from sbm_package
where createrid=21120 and createtime>=to_date('2006-09-30','yyyy-mm-dd') and
createtime<=to_date('2006-10-30','yyyy-mm-dd') and
subattributetypeid =70 and priattributetypeid=12
你是否可以把ORACLE环境信息、表结构等全部提供一下,以供分析。
看不出你的sql文有问题
语句中COUNT(packageid)的时候,系统调用了GROUP BY子句。建议楼主给出表结构,你提供的信息太少,无法判断是在哪里出错。