先吐槽一句,oracle 真坑啊!
一个很正常的sql 语句一直报 ORA-00911: 无效字符 ,拿到数据库去执行一点问题没有,一运行代码就报错,然后一个字符一个字符的对比,竟然是因为sql 结尾的一个 ";" 导致,真坑
报错的语句
sql
@Insert(
"insert into OCMREPORT.OCMREPORT_INIPOINTSGQ " +
" (OCCUR_MKT,EXP_DATE,OCCUR_MONTH,CSJF,XHJF,CSCE,HJCS,CSZB,GQJF,FPJFJE,QCJE,FSDATE,HJGQ) " +
" values " +
" (#{point.occurMkt},#{point.expDate},#{point.occurMonth},#{point.csjf},#{point.xhjf},#{point.csce},0,0,#{point.gqjf},0,0,#{point.fsdate},0);")
void insertPointsGqOne(@Param("point")OcmReportIniPointsGq point);
正确执行的语句
sql
@Insert(
"insert into OCMREPORT.OCMREPORT_INIPOINTSGQ " +
" (OCCUR_MKT,EXP_DATE,OCCUR_MONTH,CSJF,XHJF,CSCE,HJCS,CSZB,GQJF,FPJFJE,QCJE,FSDATE,HJGQ) " +
" values " +
" (#{point.occurMkt},#{point.expDate},#{point.occurMonth},#{point.csjf},#{point.xhjf},#{point.csce},0,0,#{point.gqjf},0,0,#{point.fsdate},0)")
void insertPointsGqOne(@Param("point")OcmReportIniPointsGq point);