ORA-06512:第23行12899. 00000 - "值对于列%s而言太大(实际:%s,最大值:%s)" 执行以下查询时出现上述错误
DECLARE M_COUNT NUMBER;M_I18N_RESOURCEBASE_ID NUMBER;
BEGIN FOR X IN
(SELECT DISTINCT TO_NUMBER(TRIM(REPLACE(E.RESOURCE_ID,' ',''))) AS RESOURCE_ID,
E.NAME_FR,
E.SHORT_DESC_FR,
E.DESCRIPTION_FR,
RBI.RESOURCE_ID AS RESOURCE_ID2
FROM EXT_FRANCE_PRODUCT E
JOIN RESOURCEBASEI18N RBI
ON (TO_NUMBER(TRIM(REPLACE(E.RESOURCE_ID,' ','')))=RBI.RESOURCE_ID)
WHERE RBI.TYPE='producttype')
LOOP SELECT COUNT(*)
INTO M_COUNT
FROM I18N_RESOURCEBASE
WHERE RESOURCE_ID=X.RESOURCE_ID
AND LANGUAGE_ID =41;
IF M_COUNT =0 THEN
INSERT
INTO I18N_RESOURCEBASE
(
LANGUAGE_ID,
RESOURCE_ID,
NAME,
SHORT_DESCRIPTION,
DESCRIPTION
)
VALUES
(
41,
X.RESOURCE_ID,
X.NAME_FR,
X.SHORT_DESC_FR,
X.DESCRIPTION_FR
)
RETURNING I18N_RESOURCEBASE_ID
INTO M_I18N_RESOURCEBASE_ID;
LOGGER.ERROR('Inserted trans are: Product '||M_I18N_RESOURCEBASE_ID);
ELSIF M_COUNT=1 THEN
UPDATE I18N_RESOURCEBASE
SET NAME =X.NAME_FR,
SHORT_DESCRIPTION = X.SHORT_DESC_FR,
DESCRIPTION = X.DESCRIPTION_FR
WHERE RESOURCE_ID=X.RESOURCE_ID
AND LANGUAGE_ID =41;
LOGGER.ERROR('Updated trans are: Product '||X.RESOURCE_ID);
END IF;
END LOOP;
END;
/
我需要在上面的代码中添加异常,这样我才能只添加那些值对于列来说不太大的行。