Object[] obj;
getHibernateTemplate().find(sql,obj);大概就是这样,当断点走到find方法是obj中的元素存在null值。
比如obj[0]=1,obj[1]=4,obj[2]=null。
此时针对于oracle就会报错,针对db2就没有问题。
sql语句是:select count(*) from Cstcustom c, CstCustomManager cm where cm.userID = ? and cm.customID = c.ID and c.sourceid = ?and cm.customID not in (select cm2.customID from CstCustomManager cm2 where cm2.userID = ?)因为oracle中的语句应该是将cm2.userID后的"=?"改为"is null"。
否则会报错ORA-00932: inconsistent datatypes: expected NUMBER got BINARY
请问如何解决该问题。