开发者社区> 问答> 正文

hibernate 使用 in 查询时报错?报错

grid.setTotal(service.count("select count(distinct t) from EbmsYgxwpcbPcjg t,TsPostinfo b where b.id=t.pcsszgw and b.zwtype not in (100007,100008,100012,100013) and t.pcsszbm in ("+ glorgas +") and t.stafcode != :stafcode and t.pcsj like :cxpcsj and t.stafcode like :cxstafcode and t.stafname like :cxstafname", params));

DB2 SQL Error: SQLCODE=-420, SQLSTATE=22018, SQLERRMC=DECFLOAT, DRIVER=3.57.82

展开
收起
爱吃鱼的程序员 2020-06-08 13:27:46 656 0
1 条回答
写回答
取消 提交回答
  • https://developer.aliyun.com/profile/5yerqm5bn5yqg?spm=a2c6h.12873639.0.0.6eae304abcjaIB

    首先这样拼写,容易造成sql注入,用hibernatesession试试

    已解决,谢谢。

    2020-06-08 13:28:03
    赞同 展开评论 打赏
问答标签:
问答地址:
问答排行榜
最热
最新

相关电子书

更多
低代码开发师(初级)实战教程 立即下载
冬季实战营第三期:MySQL数据库进阶实战 立即下载
阿里巴巴DevOps 最佳实践手册 立即下载