1
我想創建一個Oracle存儲過程,只需將一行插入到表中。表(MEAS_IND)中有一列是char類型(1字節),不能爲空。當我嘗試插入任何一個字符列/表我得到的錯誤:無效數字格式模型oracle錯誤插入字符
ORA-01481: invalid number format model ORA-06512: at "IFDC.PKG_FIELD_ASSISTANT", line 326 ORA-06512: at line 3 01481. 00000 - "invalid number format model" *Cause: The user is attempting to either convert a number to a string via TO_CHAR or a string to a number via TO_NUMBER and has supplied an invalid number format model parameter. *Action: Consult your manual.
我試圖插入「」,「N」和TO_CHAR(」「)。有其他列不能爲空,似乎工作正常。當我註釋掉MEAS_IND時,我得到的錯誤是它不能爲空,所以我假設其他列都很好。下面是代碼:
INSERT INTO myTable
(
cont_id
, cms_uid
, dwr_dt
, prj_nbr
, ln_itm_nbr
, loc_seq_nbr
, loc_instld
, vend_id
, rpt_qty
, itm_cd
, last_modfd_uid
, last_modfd_dt
, catg_nbr
, rmrks_id, plan_pg_ref_nbr, ref_doc, fr_sta_itm, fr_sta_dstnc, fr_sta_offst_t, fr_sta_offst_dstnc
, to_sta_itm, to_sta_dstnc, to_sta_offst_t, to_sta_offst_dstnc, meas_ind
)
VALUES
(
pContractId
, pUSER_ID
, pDRW_DATE
, pProject_num
, pPLN
, vMaxLocSeq
, pLocation
, pVend_id
, pAmount
, pItemCode
, pUSER_ID
, to_number(sysdate, 'YYYYMMDD')
, vCatigoryNumber
, ' ', ' ', ' ', ' ', 0, ' ', 0
, ' ', 0, ' ', 0, ' '
) ;
在此先感謝
找到答案:這是to_number轉換 – indianapolymath
請問最低投票人請解釋投票的原因嗎?別往心裏放;只是如果有什麼問題我想解決它。謝謝。 –