当前位置: 技术问答>java相关
sqlservre nvachar 子段不能排序吗?
来源: 互联网 发布时间:2017-04-29
本文导语: SELECT SaveMoneyInfo.Person_No, SaveMoneyInfo.Op_Date, SaveMoneyInfo.Op_Time FROM SaveMoneyInfo WHERE SaveMone yInfo.Person_No = '0000001' order by Op_Date desc ***SQLException caught*** SQLState:HY000 Message :[Microsoft][SQLServer 2000 Driver for JDBC...
SELECT SaveMoneyInfo.Person_No, SaveMoneyInfo.Op_Date, SaveMoneyInfo.Op_Time FROM SaveMoneyInfo WHERE SaveMone
yInfo.Person_No = '0000001' order by Op_Date desc
***SQLException caught***
SQLState:HY000
Message :[Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]Column name 'Save
MoneyInfo.Op_Date' is invalid in the ORDER BY clause because it is not contained
in an aggregate function and there is no GROUP BY clause.
Vendor :8126
yInfo.Person_No = '0000001' order by Op_Date desc
***SQLException caught***
SQLState:HY000
Message :[Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]Column name 'Save
MoneyInfo.Op_Date' is invalid in the ORDER BY clause because it is not contained
in an aggregate function and there is no GROUP BY clause.
Vendor :8126
|
sorry
group by 0/1
group by 0/1
|
语句应该是正确的,可以在mysql的query analyzer中验正。
检查程序及运行环境。
检查程序及运行环境。
您可能感兴趣的文章:
本站(WWW.)旨在分享和传播互联网科技相关的资讯和技术,将尽最大努力为读者提供更好的信息聚合和浏览方式。
本站(WWW.)站内文章除注明原创外,均为转载、整理或搜集自网络。欢迎任何形式的转载,转载请注明出处。
本站(WWW.)站内文章除注明原创外,均为转载、整理或搜集自网络。欢迎任何形式的转载,转载请注明出处。