ORA-06550: line 224, column 7: error running in SQLPLUS

15 pts.
Tags:
ORA-06550
Oracle error messages
PL/SQL
Im getting the following error when running the code below:

SQL> @n377d_load_tfdscpm_sxb.sql       exception       * ERROR at line 224: ORA-06550: line 224, column 7: PLS-00103: Encountered the symbol "EXCEPTION" when expecting one of the following: begin case declare end exit for goto if loop mod null pragma raise return select update while with <an identifier> <a double-quoted delimited-identifier> <a bind variable> << close current delete fetch lock insert open rollback savepoint set sql execute commit forall merge pipe ORA-06550: line 235, column 5: PLS-00103: Encountered the symbol "DBMS_OUTPUT" when expecting one of the following: end not pragma final instantiable order overriding static member constructor map ORA-06550: line 235, column 63: PLS-00103: Encountered the symbol ";" when expecting one of the following: . ( , * % & - + / at mod remainder rem <an identifier> <a double-quoted delimited-identifier> <an exponent (**)> as from into || multiset bulk ORA-06550: line 451, column 3: PLS-00103: Encountered the symbol "DBMS_OUTPUT" ORA-06550: line 451, column 101: PLS-00103: Encountered the symbol ";"

Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options

 

declare   cursor c_tfdscpm_sxb_ext is     select dt_dri_nr              ,ogz_dfl_psl_dri_nr              ,src_rec_udt_ts              ,unv_cny_cd              ,unv_ogz_nr              ,unv_reg_nr              ,unv_dis_nr              ,unv_div_nr              ,ctr_wrk_sxb_qy              ,ctr_wrk_tmp_qy              ,scv_wkh_qy              ,scv_otc_lon_hr_qy              ,scv_bor_hr_qy              ,scv_prl_owk_alh_qy              ,scv_ls_owk_alh_qy              ,scv_clk_owk_alh_qy              ,scv_oth_owk_alh_qy              ,scv_del_pkg_qy              ,scv_net_del_pkg_qy              ,scv_pu_pkg_qy              ,scv_ds_qy              ,scv_pu_stp_qy              ,scv_drr_stp_qy              ,scv_tlr_pu_pal_qy              ,scv_tlr_los_pkg_qy              ,scv_spc_cnt_a_qy              ,scv_spc_cnt_b_qy              ,scv_spc_cnt_c_qy              ,scv_spc_cnt_d_qy              ,scv_spc_cnt_e_qy              ,scv_spc_cnt_f_qy              ,scv_spc_cnt_g_qy              ,scv_spc_cnt_h_qy              ,scv_spc_cnt_i_qy              ,scv_spc_cnt_j_qy              ,scv_spc_cnt_k_qy              ,scv_1da_del_pkg_qy              ,scv_2da_del_pkg_qy              ,scv_mss_del_pkg_qy              ,scv_cod_sag_pkg_qy              ,scv_sag_pd_pkg_qy              ,cod_pkg_clt_qy              ,scv_ctg_del_pkg_qy              ,pvs_rec_del_pkg_qy              ,scv_pmm_mss_tm_qy              ,scv_pm_rcr_pkg_qy              ,scv_bef_230_pus_qy              ,scv_bef_230_ppk_qy              ,scv_dbx_qy              ,scv_dbx_isd_pus_qy              ,scv_dbx_osd_pus_qy              ,scv_ppy_pu_pkg_qy              ,scv_dmd_pu_pkg_qy              ,scv_dmd_pu_air_qy              ,scv_pu_stp_mss_qy              ,scv_hi_vlu_ppk_qy              ,scv_owt_pkg_qy              ,scv_xps_pls_ppk_qy              ,scv_xps_ppk_qy              ,scv_xps_sav_ppk_qy              ,scv_xpi_pu_pkg_qy              ,scv_3ds_pu_pkg_qy              ,scv_std_pu_pkg_qy              ,scv_ecn_pu_pkg_qy              ,scv_inl_pu_pkg_qy              ,scv_xps_pls_pkd_qy              ,scv_xps_del_pkg_qy              ,scv_xps_sav_pkd_qy              ,scv_xpi_del_pkg_qy              ,scv_3ds_del_pkg_qy              ,scv_std_pkd_qy              ,scv_ecn_pkd_qy              ,scv_inl_pkd_qy              ,scv_spc_cnt_1_qy              ,scv_spc_cnt_2_qy              ,scv_spc_cnt_3_qy              ,scv_spc_cnt_4_qy              ,scv_spc_cnt_5_qy              ,scv_spc_cnt_6_qy              ,scv_spc_cnt_7_qy              ,scv_spc_cnt_8_qy              ,scv_spc_cnt_9_qy              ,scv_spc_cnt_10_qy              ,scv_spc_cnt_11_qy              ,scv_spc_cnt_12_qy              ,scv_spc_cnt_13_qy              ,scv_spc_cnt_14_qy              ,scv_spc_cnt_15_qy              ,scv_spc_cnt_16_qy              ,scv_spc_cnt_17_qy              ,scv_spc_cnt_18_qy              ,scv_spc_cnt_19_qy              ,scv_spc_cnt_20_qy     from   tfdscpm_sxb_ext;   L_ext_rec_cnt     PLS_INTEGER := 0;   L_ins_rec_cnt     PLS_INTEGER := 0;   L_upd_rec_cnt     PLS_INTEGER := 0;   L_commit_cnt      PLS_INTEGER := 0;   L_rec_inserted    BOOLEAN := FALSE;   L_rec_insert_disp  VARCHAR2(1);   L_start_time      DATE;   L_end_time        DATE;   L_elap_time       NUMBER;   L_elap_time_c     VARCHAR2(30);   L_dt_dri_nr       NUMBER;   L_tmp_ctr         NUMBER;   L_pgm_name        CONSTANT VARCHAR2(20) := 'n377d_load_tfdscpm_sxb';   I2                PLS_INTEGER := 0; begin   L_start_time := sysdate;   dbms_output.put_line( 'PGM BEGIN DATE/TIME :         '||TO_CHAR(sysdate,'YYYY-MM-DD  HH24:MI:SS'));   dbms_output.put_line('********************************************');   stat_pkg.report_status(L_pgm_name,0,'***PGM START***');   L_tmp_ctr := to_number(to_char(sysdate,'sssss'));   for extrec in c_tfdscpm_sxb_ext loop     L_ext_rec_cnt := L_ext_rec_cnt + 1;     L_rec_inserted  := FALSE;     L_rec_insert_disp := 'N';  -- dbms_output.put_line('***' );  -- dbms_output.put_line('record count      : '||L_ext_rec_cnt );  -- dbms_output.put_line('input data' );  -- dbms_output.put_line('dt dri            : '||extrec.dt_dri_nr );  -- dbms_output.put_line('ogz               : '||extrec.unv_ogz_nr );  -- dbms_output.put_line('cny               : '||extrec.unv_cny_cd );  -- dbms_output.put_line('***' );     update tfdscpm_sxb t1        set    ogz_dfl_psl_dri_nr  = extrec.ogz_dfl_psl_dri_nr              ,src_rec_udt_ts  = extrec.src_rec_udt_ts               ,unv_cny_cd  = extrec.unv_cny_cd               ,unv_ogz_nr  = extrec.unv_ogz_nr               ,unv_reg_nr  = extrec.unv_reg_nr               ,unv_dis_nr  = extrec.unv_dis_nr               ,unv_div_nr  = extrec.unv_div_nr               ,ctr_wrk_sxb_qy  = extrec.ctr_wrk_sxb_qy               ,ctr_wrk_tmp_qy  = extrec.ctr_wrk_tmp_qy               ,scv_wkh_qy  = extrec.scv_wkh_qy               ,scv_otc_lon_hr_qy  = extrec.scv_otc_lon_hr_qy              ,scv_bor_hr_qy  = extrec.scv_bor_hr_qy               ,scv_prl_owk_alh_qy = extrec.scv_prl_owk_alh_qy              ,scv_ls_owk_alh_qy  = extrec.scv_ls_owk_alh_qy              ,scv_clk_owk_alh_qy = extrec.scv_clk_owk_alh_qy              ,scv_oth_owk_alh_qy = extrec.scv_oth_owk_alh_qy              ,scv_del_pkg_qy  = extrec.scv_del_pkg_qy               ,scv_net_del_pkg_qy = extrec.scv_net_del_pkg_qy              ,scv_pu_pkg_qy  = extrec.scv_pu_pkg_qy               ,scv_ds_qy          = extrec.scv_ds_qy               ,scv_pu_stp_qy  = extrec.scv_pu_stp_qy               ,scv_drr_stp_qy  = extrec.scv_drr_stp_qy               ,scv_tlr_pu_pal_qy  = extrec.scv_tlr_pu_pal_qy              ,scv_tlr_los_pkg_qy = extrec.scv_tlr_los_pkg_qy              ,scv_spc_cnt_a_qy  = extrec.scv_spc_cnt_a_qy              ,scv_spc_cnt_b_qy  = extrec.scv_spc_cnt_b_qy              ,scv_spc_cnt_c_qy  = extrec.scv_spc_cnt_c_qy              ,scv_spc_cnt_d_qy  = extrec.scv_spc_cnt_d_qy              ,scv_spc_cnt_e_qy  = extrec.scv_spc_cnt_e_qy              ,scv_spc_cnt_f_qy  = extrec.scv_spc_cnt_f_qy              ,scv_spc_cnt_g_qy  = extrec.scv_spc_cnt_g_qy              ,scv_spc_cnt_h_qy  = extrec.scv_spc_cnt_h_qy              ,scv_spc_cnt_i_qy  = extrec.scv_spc_cnt_i_qy              ,scv_spc_cnt_j_qy  = extrec.scv_spc_cnt_j_qy              ,scv_spc_cnt_k_qy  = extrec.scv_spc_cnt_k_qy              ,scv_1da_del_pkg_qy = extrec.scv_1da_del_pkg_qy              ,scv_2da_del_pkg_qy = extrec.scv_2da_del_pkg_qy              ,scv_mss_del_pkg_qy = extrec.scv_mss_del_pkg_qy              ,scv_cod_sag_pkg_qy = extrec.scv_cod_sag_pkg_qy              ,scv_sag_pd_pkg_qy  = extrec.scv_sag_pd_pkg_qy              ,cod_pkg_clt_qy  = extrec.cod_pkg_clt_qy               ,scv_ctg_del_pkg_qy = extrec.scv_ctg_del_pkg_qy              ,pvs_rec_del_pkg_qy = extrec.pvs_rec_del_pkg_qy              ,scv_pmm_mss_tm_qy  = extrec.scv_pmm_mss_tm_qy              ,scv_pm_rcr_pkg_qy  = extrec.scv_pm_rcr_pkg_qy              ,scv_bef_230_pus_qy = extrec.scv_bef_230_pus_qy              ,scv_bef_230_ppk_qy = extrec.scv_bef_230_ppk_qy              ,scv_dbx_qy  = extrec.scv_dbx_qy               ,scv_dbx_isd_pus_qy = extrec.scv_dbx_isd_pus_qy              ,scv_dbx_osd_pus_qy = extrec.scv_dbx_osd_pus_qy              ,scv_ppy_pu_pkg_qy  = extrec.scv_ppy_pu_pkg_qy              ,scv_dmd_pu_pkg_qy  = extrec.scv_dmd_pu_pkg_qy              ,scv_dmd_pu_air_qy  = extrec.scv_dmd_pu_air_qy              ,scv_pu_stp_mss_qy  = extrec.scv_pu_stp_mss_qy              ,scv_hi_vlu_ppk_qy  = extrec.scv_hi_vlu_ppk_qy              ,scv_owt_pkg_qy  = extrec.scv_owt_pkg_qy              ,scv_xps_pls_ppk_qy = extrec.scv_xps_pls_ppk_qy              ,scv_xps_ppk_qy  = extrec.scv_xps_ppk_qy              ,scv_xps_sav_ppk_qy = extrec.scv_xps_sav_ppk_qy              ,scv_xpi_pu_pkg_qy  = extrec.scv_xpi_pu_pkg_qy              ,scv_3ds_pu_pkg_qy  = extrec.scv_3ds_pu_pkg_qy              ,scv_std_pu_pkg_qy  = extrec.scv_std_pu_pkg_qy              ,scv_ecn_pu_pkg_qy  = extrec.scv_ecn_pu_pkg_qy              ,scv_inl_pu_pkg_qy  = extrec.scv_inl_pu_pkg_qy              ,scv_xps_pls_pkd_qy = extrec.scv_xps_pls_pkd_qy              ,scv_xps_del_pkg_qy = extrec.scv_xps_del_pkg_qy              ,scv_xps_sav_pkd_qy = extrec.scv_xps_sav_pkd_qy              ,scv_xpi_del_pkg_qy = extrec.scv_xpi_del_pkg_qy              ,scv_3ds_del_pkg_qy = extrec.scv_3ds_del_pkg_qy              ,scv_std_pkd_qy  = extrec.scv_std_pkd_qy               ,scv_ecn_pkd_qy  = extrec.scv_ecn_pkd_qy              ,scv_inl_pkd_qy  = extrec.scv_inl_pkd_qy               ,scv_spc_cnt_1_qy  = extrec.scv_spc_cnt_1_qy              ,scv_spc_cnt_2_qy  = extrec.scv_spc_cnt_2_qy              ,scv_spc_cnt_3_qy  = extrec.scv_spc_cnt_3_qy              ,scv_spc_cnt_4_qy  = extrec.scv_spc_cnt_4_qy              ,scv_spc_cnt_5_qy  = extrec.scv_spc_cnt_5_qy              ,scv_spc_cnt_6_qy  = extrec.scv_spc_cnt_6_qy              ,scv_spc_cnt_7_qy  = extrec.scv_spc_cnt_7_qy              ,scv_spc_cnt_8_qy  = extrec.scv_spc_cnt_8_qy              ,scv_spc_cnt_9_qy  = extrec.scv_spc_cnt_9_qy              ,scv_spc_cnt_10_qy  = extrec.scv_spc_cnt_10_qy              ,scv_spc_cnt_11_qy  = extrec.scv_spc_cnt_11_qy              ,scv_spc_cnt_12_qy  = extrec.scv_spc_cnt_12_qy              ,scv_spc_cnt_13_qy  = extrec.scv_spc_cnt_13_qy              ,scv_spc_cnt_14_qy  = extrec.scv_spc_cnt_14_qy              ,scv_spc_cnt_15_qy  = extrec.scv_spc_cnt_15_qy              ,scv_spc_cnt_16_qy  = extrec.scv_spc_cnt_16_qy              ,scv_spc_cnt_17_qy  = extrec.scv_spc_cnt_17_qy              ,scv_spc_cnt_18_qy  = extrec.scv_spc_cnt_18_qy              ,scv_spc_cnt_19_qy  = extrec.scv_spc_cnt_19_qy              ,scv_spc_cnt_20_qy  = extrec.scv_spc_cnt_20_qy              ,rec_udt_ts                = sysdate         where dt_dri_nr                 = extrec.dt_dri_nr         and   unv_cny_cd                = extrec.unv_cny_cd         and   unv_ogz_nr                = extrec.unv_ogz_nr;       exception         when others then           dbms_output.put_line( '------------- EXCEPTION 2 -----------------' );           dbms_output.put_line( 'ERROR UPDATING TFDSCPM_SXB row' );           dbms_output.put_line( 'EXTERNAL ROW = '||L_ext_rec_cnt );           dbms_output.put_line( 'SQLCODE = '||SQLCODE );           dbms_output.put_line( 'SQL Text = '||SQLERRM );           dbms_output.put_line( '-------------------------------------------' );           stat_pkg.report_status( L_pgm_name, SQLCODE, SQLERRM );           raise_application_error(-20002,'ERROR EXIT CODE='||sqlcode );       end;   --  dbms_output.put_line( 'insert sw1 : '||L_rec_insert_disp );     if sql%rowcount = 0 then       begin         insert into tfdscpm_sxb (               dt_dri_nr              ,ogz_dfl_psl_dri_nr              ,rec_udt_ts              ,rec_ins_ts              ,src_rec_udt_ts              ,unv_cny_cd              ,unv_ogz_nr              ,unv_reg_nr              ,unv_dis_nr              ,unv_div_nr              ,ctr_wrk_sxb_qy              ,ctr_wrk_tmp_qy              ,scv_wkh_qy              ,scv_otc_lon_hr_qy              ,scv_bor_hr_qy              ,scv_prl_owk_alh_qy              ,scv_ls_owk_alh_qy              ,scv_clk_owk_alh_qy              ,scv_oth_owk_alh_qy              ,scv_del_pkg_qy              ,scv_net_del_pkg_qy              ,scv_pu_pkg_qy              ,scv_ds_qy              ,scv_pu_stp_qy              ,scv_drr_stp_qy              ,scv_tlr_pu_pal_qy              ,scv_tlr_los_pkg_qy              ,scv_spc_cnt_a_qy              ,scv_spc_cnt_b_qy              ,scv_spc_cnt_c_qy              ,scv_spc_cnt_d_qy              ,scv_spc_cnt_e_qy              ,scv_spc_cnt_f_qy              ,scv_spc_cnt_g_qy              ,scv_spc_cnt_h_qy              ,scv_spc_cnt_i_qy              ,scv_spc_cnt_j_qy              ,scv_spc_cnt_k_qy              ,scv_1da_del_pkg_qy              ,scv_2da_del_pkg_qy              ,scv_mss_del_pkg_qy              ,scv_cod_sag_pkg_qy              ,scv_sag_pd_pkg_qy              ,cod_pkg_clt_qy              ,scv_ctg_del_pkg_qy              ,pvs_rec_del_pkg_qy              ,scv_pmm_mss_tm_qy              ,scv_pm_rcr_pkg_qy              ,scv_bef_230_pus_qy              ,scv_bef_230_ppk_qy              ,scv_dbx_qy              ,scv_dbx_isd_pus_qy              ,scv_dbx_osd_pus_qy              ,scv_ppy_pu_pkg_qy              ,scv_dmd_pu_pkg_qy              ,scv_dmd_pu_air_qy              ,scv_pu_stp_mss_qy              ,scv_hi_vlu_ppk_qy              ,scv_owt_pkg_qy              ,scv_xps_pls_ppk_qy              ,scv_xps_ppk_qy              ,scv_xps_sav_ppk_qy              ,scv_xpi_pu_pkg_qy              ,scv_3ds_pu_pkg_qy              ,scv_std_pu_pkg_qy              ,scv_ecn_pu_pkg_qy              ,scv_inl_pu_pkg_qy              ,scv_xps_pls_pkd_qy              ,scv_xps_del_pkg_qy              ,scv_xps_sav_pkd_qy              ,scv_xpi_del_pkg_qy              ,scv_3ds_del_pkg_qy              ,scv_std_pkd_qy              ,scv_ecn_pkd_qy              ,scv_inl_pkd_qy              ,scv_spc_cnt_1_qy              ,scv_spc_cnt_2_qy              ,scv_spc_cnt_3_qy              ,scv_spc_cnt_4_qy              ,scv_spc_cnt_5_qy              ,scv_spc_cnt_6_qy              ,scv_spc_cnt_7_qy              ,scv_spc_cnt_8_qy              ,scv_spc_cnt_9_qy              ,scv_spc_cnt_10_qy              ,scv_spc_cnt_11_qy              ,scv_spc_cnt_12_qy              ,scv_spc_cnt_13_qy              ,scv_spc_cnt_14_qy              ,scv_spc_cnt_15_qy              ,scv_spc_cnt_16_qy              ,scv_spc_cnt_17_qy              ,scv_spc_cnt_18_qy              ,scv_spc_cnt_19_qy              ,scv_spc_cnt_20_qy         values(  extrec.dt_dri_nr                  ,extrec.ogz_dfl_psl_dri_nr                 ,sysdate                 ,sysdate                 ,extrec.src_rec_udt_ts                  ,extrec.unv_cny_cd                  ,extrec.unv_ogz_nr                  ,extrec.unv_reg_nr                  ,extrec.unv_dis_nr                  ,extrec.unv_div_nr                  ,extrec.ctr_wrk_sxb_qy                  ,extrec.ctr_wrk_tmp_qy                  ,extrec.scv_wkh_qy                  ,extrec.scv_otc_lon_hr_qy                 ,extrec.scv_bor_hr_qy                  ,extrec.scv_prl_owk_alh_qy                 ,extrec.scv_ls_owk_alh_qy                 ,extrec.scv_clk_owk_alh_qy                 ,extrec.scv_oth_owk_alh_qy                 ,extrec.scv_del_pkg_qy                  ,extrec.scv_net_del_pkg_qy                 ,extrec.scv_pu_pkg_qy                  ,extrec.scv_ds_qy                  ,extrec.scv_pu_stp_qy                  ,extrec.scv_drr_stp_qy                  ,extrec.scv_tlr_pu_pal_qy                 ,extrec.scv_tlr_los_pkg_qy                 ,extrec.scv_spc_cnt_a_qy                 ,extrec.scv_spc_cnt_b_qy                 ,extrec.scv_spc_cnt_c_qy                 ,extrec.scv_spc_cnt_d_qy                 ,extrec.scv_spc_cnt_e_qy                 ,extrec.scv_spc_cnt_f_qy                 ,extrec.scv_spc_cnt_g_qy                 ,extrec.scv_spc_cnt_h_qy                 ,extrec.scv_spc_cnt_i_qy                 ,extrec.scv_spc_cnt_j_qy                 ,extrec.scv_spc_cnt_k_qy                 ,extrec.scv_1da_del_pkg_qy                 ,extrec.scv_2da_del_pkg_qy                 ,extrec.scv_mss_del_pkg_qy                 ,extrec.scv_cod_sag_pkg_qy                 ,extrec.scv_sag_pd_pkg_qy                 ,extrec.cod_pkg_clt_qy                  ,extrec.scv_ctg_del_pkg_qy                 ,extrec.pvs_rec_del_pkg_qy                 ,extrec.scv_pmm_mss_tm_qy                 ,extrec.scv_pm_rcr_pkg_qy                 ,extrec.scv_bef_230_pus_qy                 ,extrec.scv_bef_230_ppk_qy                 ,extrec.scv_dbx_qy                  ,extrec.scv_dbx_isd_pus_qy                 ,extrec.scv_dbx_osd_pus_qy                 ,extrec.scv_ppy_pu_pkg_qy                 ,extrec.scv_dmd_pu_pkg_qy                 ,extrec.scv_dmd_pu_air_qy                 ,extrec.scv_pu_stp_mss_qy                 ,extrec.scv_hi_vlu_ppk_qy                 ,extrec.scv_owt_pkg_qy                 ,extrec.scv_xps_pls_ppk_qy                 ,extrec.scv_xps_ppk_qy                 ,extrec.scv_xps_sav_ppk_qy                 ,extrec.scv_xpi_pu_pkg_qy                 ,extrec.scv_3ds_pu_pkg_qy                 ,extrec.scv_std_pu_pkg_qy                 ,extrec.scv_ecn_pu_pkg_qy                 ,extrec.scv_inl_pu_pkg_qy                 ,extrec.scv_xps_pls_pkd_qy                 ,extrec.scv_xps_del_pkg_qy                 ,extrec.scv_xps_sav_pkd_qy                 ,extrec.scv_xpi_del_pkg_qy                 ,extrec.scv_3ds_del_pkg_qy                 ,extrec.scv_std_pkd_qy                  ,extrec.scv_ecn_pkd_qy                 ,extrec.scv_inl_pkd_qy                  ,extrec.scv_spc_cnt_1_qy                 ,extrec.scv_spc_cnt_2_qy                 ,extrec.scv_spc_cnt_3_qy                 ,extrec.scv_spc_cnt_4_qy                 ,extrec.scv_spc_cnt_5_qy                 ,extrec.scv_spc_cnt_6_qy                 ,extrec.scv_spc_cnt_7_qy                 ,extrec.scv_spc_cnt_8_qy                 ,extrec.scv_spc_cnt_9_qy                 ,extrec.scv_spc_cnt_10_qy                 ,extrec.scv_spc_cnt_11_qy                 ,extrec.scv_spc_cnt_12_qy                 ,extrec.scv_spc_cnt_13_qy                 ,extrec.scv_spc_cnt_14_qy                 ,extrec.scv_spc_cnt_15_qy                 ,extrec.scv_spc_cnt_16_qy                 ,extrec.scv_spc_cnt_17_qy                 ,extrec.scv_spc_cnt_18_qy                 ,extrec.scv_spc_cnt_19_qy                 ,extrec.scv_spc_cnt_20_qy);       L_rec_inserted   := TRUE;       exception         when others then           dbms_output.put_line( '--------- EXCEPTION 1 ------------------' );           dbms_output.put_line( 'ERROR INSERTING TFDSCPM_SXB row' );           dbms_output.put_line( 'EXTERNAL ROW = '||L_ext_rec_cnt );           dbms_output.put_line( 'SQLCODE = '||SQLCODE );           dbms_output.put_line( 'SQL Text = '||SQLERRM );           dbms_output.put_line( '-------------------------------------------' );           stat_pkg.report_status( L_pgm_name, SQLCODE, SQLERRM );           raise_application_error(-20001,'ERROR EXIT CODE='||sqlcode );       end;     end if;     if L_rec_inserted then   --    dbms_output.put_line( 'inserted' );       L_ins_rec_cnt := L_ins_rec_cnt + 1;     else       L_upd_rec_cnt := L_upd_rec_cnt + 1;   --    dbms_output.put_line( 'updated ' );     end if;   end loop; --   dbms_output.put_line( 'PGM END DATE/TIME :           '||TO_CHAR(sysdate,'YYYY-MM-DD  HH24:MI:SS'));   dbms_output.put_line( 'EXTERNAL TABLE COUNT = '|| LPAD(TO_CHAR( L_ext_rec_cnt ),7));   dbms_output.put_line( 'EXTERNAL FETCH COUNT = '|| LPAD(TO_CHAR( L_ext_rec_cnt ),7));   dbms_output.put_line( '*******************************************' );   dbms_output.put_line( 'BASE FOUND           = '|| LPAD(TO_CHAR( L_upd_rec_cnt ),7));   dbms_output.put_line( 'BASE NOT FOUND       = '|| LPAD(TO_CHAR( L_ins_rec_cnt ),7));   dbms_output.put_line( 'BASE INSERTED        = '|| LPAD(TO_CHAR( L_ins_rec_cnt ),7));   dbms_output.put_line( 'BASE UPDATED         = '|| LPAD(TO_CHAR( L_upd_rec_cnt ),7));

  dbms_output.put_line( '-------------------------------------------' );   L_end_time :=  sysdate;   dbms_output.put_line('Start='||to_char(L_start_time,'yy-mm-dd hh24:mi:ss') ||' End='||to_char(L_end_time,'yy-mm-dd hh24:mi:ss') );   L_elap_time := ( L_end_time - L_start_time ) *60*60*24;   L_elap_time_c := NUMTODSINTERVAL( L_elap_time, 'SECOND' );   dbms_output.put_line( 'Elapsed time: '||substr( L_elap_time_c, 12, 8 ));   commit;   stat_pkg.report_status(L_pgm_name,0,'Ext='||L_ext_rec_cnt||' Upd='||L_upd_rec_cnt||' Ins='||L_ins_rec_cnt);   stat_pkg.report_status(L_pgm_name,0,'Completed. Elapsed='||substr( L_elap_time_c, 12, 8 )); exception     when others then      rollback;      dbms_output.put_line( '-------------------------------------------' );      dbms_output.put_line( 'ERROR IN FACT UPDATE' );      dbms_output.put_line( 'EXTERNAL TABLE COUNT = '|| LPAD(TO_CHAR( L_ext_rec_cnt ),7));      dbms_output.put_line( 'Error was encountered - '||SQLCODE||' -ERROR- '||SQLERRM );      dbms_output.put_line( '-------------------------------------------' );      stat_pkg.report_status( L_pgm_name, SQLCODE, SQLERRM );      raise; end; / exit

 

 



Software/Hardware used:
Oracle 10.2.0.4.0 running on UNIX

Answer Wiki

Thanks. We'll let you know when a new response is added.

You have an EXCEPTION section for the UPDATE to table tfdscpm_sxb; but it’s not in it’s own block. Put a BEGIN before the UPDATE. Also, the Insert list before the VALUES keyword is missing the closing right paren.

Discuss This Question: 2  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • carlosdl
    Your code is unreadable, could you please post it again, and let us know what is the line 224 ? Thanks,
    69,835 pointsBadges:
    report
  • Catch93
    Oh sorry carlos. I found the error.. it is forgetting to define the begin and end block .. sorry the code was too long to repost.. line 224 was the start of the exception block
    15 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following