java.sql.SQLException: ORA-01858: 在要求输入数字处找到非数字字符!!!!
String hql = "from ProblemModel as a where 1=1";
//时间查询
if (t1 != null && t2 != null) {
hql += " and a.createDate between to_timestamp(substr(:t1,1,10),'YYYY-mm-dd') and to_timestamp(substr(:t2,1,10),'YYYY-mm-dd')";
}
Query query = session.createQuery(hql);if (t1 != null && t2 != null) {
query.setParameter("t1", t1);
query.setParameter("t2", t2);
}List rt = query.list();
在执行上面这句是出现错误信息:java.sql.SQLException: ORA-01858: 在要求输入数字处找到非数字字符请高手指点这是是什么问题!
String hql = "from ProblemModel as a where 1=1";
//时间查询
if (t1 != null && t2 != null) {
hql += " and a.createDate between to_timestamp(substr(:t1,1,10),'YYYY-mm-dd') and to_timestamp(substr(:t2,1,10),'YYYY-mm-dd')";
}
Query query = session.createQuery(hql);if (t1 != null && t2 != null) {
query.setParameter("t1", t1);
query.setParameter("t2", t2);
}List rt = query.list();
在执行上面这句是出现错误信息:java.sql.SQLException: ORA-01858: 在要求输入数字处找到非数字字符请高手指点这是是什么问题!
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货