Parameter index out of range (1 > number of parameters, which is 0). 在线等大神帮忙,是like错了
Stringsql="selectcount(exportclient.id),"+"count(orderformclient.id),"+"count(produce...
String sql="select count(exportclient.id)," +
"count(orderformclient.id)," +
"count(producenote.id)," +
"count(paymentbuy.id)," +
"count(instoredocument.id)," +
"count(outstoredocument.id)," +
"count(incasementdocument.id)," +
"count(sampledocument.id)," +
"count(canceldocument.id)" +
"from" +
" exportclient," +
"orderformclient," +
"producenote,"+
"paymentbuy," +
"instoredocument," +
"outstoredocument," +
"incasementdocument," +
"sampledocument," +
"canceldocument" +
" where " +
"exportclient.dates and " +
"orderformclient.times and " +
"producenote.confirmtime and " +
"paymentbuy.times and " +
"instoredocument.intime and " +
"outstoredocument.outtime and " +
"incasementdocument.times and " +
"sampledocument.times and " +
"canceldocument.times " +
"like '?-?'"; 展开
"count(orderformclient.id)," +
"count(producenote.id)," +
"count(paymentbuy.id)," +
"count(instoredocument.id)," +
"count(outstoredocument.id)," +
"count(incasementdocument.id)," +
"count(sampledocument.id)," +
"count(canceldocument.id)" +
"from" +
" exportclient," +
"orderformclient," +
"producenote,"+
"paymentbuy," +
"instoredocument," +
"outstoredocument," +
"incasementdocument," +
"sampledocument," +
"canceldocument" +
" where " +
"exportclient.dates and " +
"orderformclient.times and " +
"producenote.confirmtime and " +
"paymentbuy.times and " +
"instoredocument.intime and " +
"outstoredocument.outtime and " +
"incasementdocument.times and " +
"sampledocument.times and " +
"canceldocument.times " +
"like '?-?'"; 展开
展开全部
你调用这个sql语句是用什么?jdbcTemplate还是原本的jdbc preparestatement,你准备穿进去的两个参数分别是什么,写一下。
你这sql语句是想达到什么目的,那么多and 之间没条件的?
你这sql语句是想达到什么目的,那么多and 之间没条件的?
更多追问追答
追问
我要传的是时间,两个参数是字符串
public List> getAll(String i,String j)
然后ps.setString(1,i);
ps.setString(2,j);
假如 i="2014"
j="9"
现在知道吗
追答
你用的什么数据库,mysql的话我可以给你写一个,你这偏的有点略远
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询