关于开发过程中遇见的一些坑 mysql Error querying database. Cause: java.sql.SQLException: Unrecognized SQL escape

Error querying database. Cause: java.sql.SQLException: Unrecognized SQL escape ‘param’ at line position 373. ### The error may exist in file [D:\demo02\bmcc_eam_web\target\classes\com\bmcc\eam\sybase\dao\ams\assets\acceptance\mapper\AssetsAcceptanceHeaderSybaseMapper.xml] ### The error may involve com.bmcc.eam.sybase.dao.ams.assets.acceptance.mapper.AssetsAcceptanceHeaderSybaseMapper.findAssetsAcceptanceTablePage_mpCount ### The error occurred while executing a query ### SQL: SELECT COUNT(*) FROM (SELECT AACH.TRANS_NO, AACH.TRANS_STATUS, AACH.FROM_GROUP_NAME, ‘’ as CURR_DEPT, ‘’ as CURR_USER, AACH.CREATED, AACH.CREATION_DATE FROM AMS_ASSETS_ACCEPTANCE_HEADER as AACH WHERE 1 = 1 and AACH.ORGANIZATION_ID = ? and AACH.PROJECT_NUM like concat(’%’,#{param.projectNum,’%’) ORDER BY AACH.CREATION_DATE DESC) TOTAL ### Cause: java.sql.SQLException: Unrecognized SQL escape ‘param’ at line position 373. ; Unrecognized SQL escape ‘param’ at line position 373.; nested exception is java.sql.SQLException: Unrecognized SQL escape ‘param’ at line position 373.

在这里插入图片描述

这个错误的原因是因为有些sql函数在不同的数据库不能识别 我在mysql查询的时候模糊查询用的是concat
但是这个项目是双库读写 另一个数据库用的是sybase mysql的函数拿到sybase里面就报错了

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值