select distinct(SUBSTR(trait_value,1,6)) from zzb2 where SUBSTR(trait_value,1,4)= '2009' order by trait_value asc
运行上面sql报:不是selected表达式
用oracle怎么写??
运行上面sql报:不是selected表达式
用oracle怎么写??
解决方案 »
- ORACLE代码方便查看的问题
- oracle sql 不用distinst,查询时如何去掉重复数据
- 一个数据库查询语句的疑问
- 写了个存储过程,怎么有时能insert(插入)10条值,有时只能插入5条值呢?
- 很简单的 if 的SQL更新问题
- 因为要进行测试,请问怎么样能够让sysdate函数产生错误,取不到系统时间?如解决,马上给分。
- 老大们帮帮小弟---关于触发器
- 请教sql
- 在Linux上安装oracle出错,求指点。
- [ORA-00600: internal error code, arguments: [qctbyt : bfc]
- 使用Odp.net,传参数Update无法更新,只有拼接字符串才有用
- 如何查询包里面的函数被哪些对象调用
------------------------------------
Cause: There is an incorrect ORDER BY item. The query is a SELECT DISTINCT query with an ORDER BY clause. In this context, all ORDER BY items must be constants, SELECT list expressions, or expressions whose operands are constants or SELECT list expressions.
------------------------------------
Action: Remove the inappropriate ORDER BY item from the SELECT list and retry the statement.