2014-01-23 75 views
-1

嗨,大家好,你能告訴我爲什麼我通過執行此查詢得到以下錯誤嗎?java準備語句java.sql.SQLException:ORA-01747

private String updateMoneyDealsEdit = "update moneydeals set mask = substr(mask,0,?)||'1'||substr(mask,?,32), " + 
"ITI=?,UTI=?,idCONTROPARTE=?,'',SDR=?,USI=?,CONFIRMATIONTIME=?,CONFIRMATIONMETHOD=?,EVENTDATE=?, " + 
" CONFIRMATIONDATE=?,codicemessaggio=?,'',PARENTCODICECONTRATTO=?,'I',RESEND=1 where CODINTORD=? and CODICEMESSAGGIO=? and EVENTCODE=? and EVENTDATE=? "; 
+0

ORA-01747:無效user.table.column,TABLE.COLUMN,或列規範。您試圖引用列名稱,但所用的列名稱是Oracle中的保留字。 –

+2

''''(兩次)和''I''不是有效的設置子句片段。 – rgettman

回答

5

因此,這裏是你正在運行格式化很好,表示將列名失蹤的更新:

update moneydeals 
    set mask = substr(mask,0,?)||'1'||substr(mask,?,32), 
     ITI=?, 
     UTI=?, 
     idCONTROPARTE=?, 
     '', -- Missing column name 
     SDR=?, 
     USI=?, 
     CONFIRMATIONTIME=?, 
     CONFIRMATIONMETHOD=?, 
     EVENTDATE=?, 
     CONFIRMATIONDATE=?, 
     codicemessaggio=?, 
     '', --Missing column name 
     PARENTCODICECONTRATTO=?, 
     'I', --Missing column name 
     RESEND=1 
    where CODINTORD=? 
    and CODICEMESSAGGIO=? 
    and EVENTCODE=? 
    and EVENTDATE=?