我收到了那个错误,下面是正在通过的查询
insert into PROD_SUBTYPE_EXCEPTION_DETAILS
(FILE_NAME,PRODUCT_CATEGORY_DESCRIPTION,PERIOD,P3,P15,TOTAL_AUM,TIME_STAMP,ID,REPORTING_YEAR)
values
('P_20130731.DAT','xxx',last_day(to_date('07'||'2013','MMYYYY')),'xxxx','xxx',8049792.04,CURRENT_TIMESTAMP,'eg12345',2010)
如果我在 SQL Developer 中执行相同的查询,它工作正常,但如果我通过我的程序传递它,我会收到该错误。
我的java程序是:
public int insert(String query, Object beanVO, Map<Integer, String> placeHolder)
throws SQLException, ClassNotFoundException, IllegalAccessException,
InvocationTargetException, NoSuchMethodException {
PreparedStatement pstmt = null;
Connection con = null;
try {
con = getConnection(true);
pstmt = con.prepareStatement(query);
setPstmtValues(pstmt, beanVO, placeHolder);
int status=pstmt.executeUpdate();
return status;
}
finally{
if (isBatchMode)
{
this.cleanResources(null, pstmt);
}
else
{
this.cleanResources(con, pstmt);
}
}
}