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里面就报错了