我在我的项目中使用过NamedParameterJdbcTemplate我写了以下查询
scustQuery = "SELECT CUSTNAME FROM SERVICE_AIRCRAFT_DETAILS_V "+
" WHERE UPPER(SERIALNUMBER) LIKE :serialnumber or :serailnumber is null "+
" AND UPPER(TAILNUMBER) LIKE :tailnumber or :tailnumber is null ";
,名称参数为
namedParams.put("serialnumber", (strSerialNum == null || strSerialNum.length()==0) ? " " : (strSerialNum.toUpperCase()+"%"));
namedParams.put("tailnumber", (strTailNum == null || strTailNum.length()==0) ? " " : (strTailNum.toUpperCase()+"%"));
但它给我org.springframework.dao.InvalidDataAccessApiUsageException异常无法弄清楚问题是什么:(
提前致谢