没有数据在insert语句中找到异常

时间:2015-06-16 11:38:21

标签: plsql oracle11g plsqldeveloper

我正在进行一个大程序,我在场景中进行插入。 不幸的是,我在INSERT语句中得到NOT DATA FOUND异常,其中没有值的select子句。

INSERT INTO CW_PC_CT
                (BATCH_ID, CONTRACT_TYPE, CONTRACT_CATEGORY, ELEMENT_ID, COMMITMENT_REFERENCE, DURATION_UNITS, DURATION,
                PLAN_ID_DISCOUNT, PLAN_ID_CREDIT, ACTIVATION_TYPE_ID_NRC, TERMINATION_TYPE_ID_NRC, IS_PROMOTION,DESCRIPTION_CODE,
                FOREIGN_CODE, START_BY_UNITS, START_BY, ACTIVE_DATE, FIXED_START_DATE, FIXED_END_DATE, PARTIAL_PERIOD,
                COMMITMENT_TYPE_ID_NRC, DISCOUNT_BASE_PERIOD, ROLLOVER_ORDER, ROLLOVER_GROUPING,BONUS_POINT_ID, PRORATE_CONTRACT_START,
                PRORATE_CONTRACT_END, PRORATE_INTERIM_BILL, PRORATE_PERIOD_CHANGE, PRORATE_ACCOUNT_START,
                PRORATE_ACCOUNT_END, PRORATE_TARGET_THRESHOLD, PRORATE_TARGET_REBATES, ALLOW_ACCOUNT, ALLOW_SERV_INST,
                ALLOW_ACCT_GROUP, ALLOW_SI_GROUP, BILL_PERIOD, MIN_DURATION_UNITS, MIN_DURATION, MIN_NOTICE_UNITS, MIN_NOTICE_DELAY,
                IS_CUSTOM, WHEN_APPLIED, APPLY_DURING_SUSPEND)
                VALUES(V_BATCH_ID, V_CONTRACT_TYPE, 8, V_GET_PARAM_INT('P_ELEMENT_ID_CT'),
                V_GET_PARAM_INT('P_COMMIT_REF_CT'), V_GET_PARAM_INT('P_DURATION_UNITS_CT_DIS'), V_GET_PARAM_INT('P_DURATION_CT_DIS'),
                V_GET_PARAM_INT('P_PLAN_ID_DISC_CT'), V_PLAN_ID_CREDIT, V_GET_PARAM_INT('P_ACT_TYPE_ID_NRC_CT_DIS'),
                V_GET_PARAM_INT('P_TERM_TYPE_ID_NRC_CT'), V_GET_PARAM_INT('P_IS_PROMOTION_CT'), V_DESCRIPTION_CODE,
                V_GET_PARAM_INT('P_FOREIGN_CODE_CT'), V_GET_PARAM_INT('P_START_BY_UNITS_CT'), V_GET_PARAM_INT('P_START_BY_CT'),
                V_COMPONENT_ACTIVE_DATE, NULL, NULL, V_GET_PARAM_INT('P_PARTIAL_PERIOD_CT'),
                V_GET_PARAM_INT('P_COMMIT_TYPE_ID_NRC_CT'), V_GET_PARAM_INT('P_DISC_BASE_PERIOD_CT'),
                V_GET_PARAM_INT('P_ROLLOVER_ORDER_CT'), V_GET_PARAM_INT('P_ROLLOVER_GRP_CT'),
                V_GET_PARAM_INT('P_BONUS_POINT_ID_CT'), V_GET_PARAM_INT('P_PRORATE_CONTRACT_START_CT'),
                V_GET_PARAM_INT('P_PRORATE_CONTRACT_END_CT'), V_GET_PARAM_INT('P_PRORATE_INTERIM_BILL_CT'),
                V_GET_PARAM_INT('P_PRORATE_PERIOD_CHANGE_CT'), V_GET_PARAM_INT('P_PRORATE_ACCOUNT_START_CT'),
                V_GET_PARAM_INT('P_PRORATE_ACCOUNT_END_CT'), V_GET_PARAM_INT('P_PRORATE_TARGET_TRSHLD_CT'),
                V_GET_PARAM_INT('P_PRORATE_TARGET_REBATES_CT'), V_GET_PARAM_INT('P_ALLOW_ACCOUNT_CT'),
                V_GET_PARAM_INT('P_ALLOW_SERV_INST_CT'), V_GET_PARAM_INT('P_ALLOW_ACCT_GROUP_CT'),
                V_GET_PARAM_INT('P_ALLOW_SI_GROUP_CT'), V_GET_PARAM_INT('P_BILL_PERIOD_CT'),
                V_GET_PARAM_INT('P_MIN_DURATION_UNITS_CT'), V_GET_PARAM_INT('P_MIN_DURATION_CT'),
                V_GET_PARAM_INT('P_MIN_NOTICE_UNITS_CT'), V_GET_PARAM_INT('P_MIN_NOTICE_DELAY_CT'),
                V_GET_PARAM_INT('P_IS_CUSTOM_CT'), V_GET_PARAM_INT('P_WHEN_APPLIED_CT'), V_GET_PARAM_INT('P_APPLY_DURING_SUSPEND_CT'));

以下是我得到的例外情况..

ORA-01403: no data found
ORA-06512: at "ABC.ABCDEFGHIJKL", line 2500
ORA-06512: at line 9

我想知道insert语句没有select子句来获取数据,但没有找到数据异常即将发生。

有人可以帮忙解决这个问题。

编辑:

V_GET_PARAM_INT不是程序或函数。

TYPE T_DEFAULT_INT     IS TABLE OF CW_PC_CONFIG_DEFAULT_MASTER.INT_VALUE%TYPE
INDEX BY               CW_PC_CONFIG_DEFAULT_MASTER.PARAMETER_NAME%TYPE;

V_GET_PARAM_INT     T_DEFAULT_INT;
V_GET_PARAM_CHAR    T_DEFAULT_CHAR;

FOR C_PARAM_INT IN C_LOAD_PC_DEFAULT_INT
LOOP
V_PARAMETER_NAME  := C_PARAM_INT.PARAMETER_NAME;
V_PARAM_INT_VALUE := C_PARAM_INT.INT_VALUE;

V_GET_PARAM_INT(V_PARAMETER_NAME) := V_PARAM_INT_VALUE;

END LOOP;

0 个答案:

没有答案