开发者社区> 问答> 正文

DataWorks数据服务查询失败:You have an error in your SQL...

已解决

DataWorks数据服务查询失败:You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near

展开
收起
提个问题! 2024-06-16 15:17:53 47 0
1 条回答
写回答
取消 提交回答
  • 开发者社区问答官方账号
    官方回答
    采纳回答
    【问题小结】用户问题:DataWorks数据服务api执行sql报错 {   "apiLog": null,   "data": null,   "errCode": 1108110622,   "errMsg": "数据源查询失败:[Failed to query from data source:[PreparedStatementCallback; bad SQL grammar [SELECT `xxx` AS `yyy`  ,row_number() OVER (PARTITION BY `uuuu` ORDER BY SUM(`tttt`) DESC) AS `pppp`  ]; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' (PARTITION BY `uuuu` ORDER BY SUM(`tttt`) DESC) AS `pppp` ",   "requestId": "0a98a79416692734116618001e4f66" }
    解决方案:经核实是数据库版本问题导致的客户版本5.6,OVER函数 8.0才开始支持的   升级大版本,点此参考
    2024-06-16 15:17:54
    赞同 5 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
SQL Server 2017 立即下载
GeoMesa on Spark SQL 立即下载
原生SQL on Hadoop引擎- Apache HAWQ 2.x最新技术解密malili 立即下载