Any suggestions about this program to improve performance and effective cod

CREATE OR REPLACE PACKAGE SEODS02.ODS_ACCOUNT
AS
Package Name : ODS_ACCOUNT
/* Description : This procedure will be called to move the data from */
/* ACCT_ALT_ID_STG (staging) table to ACCT_ALT_ID table and EODS_ACCT */
/* table for all new accounts */
/**************** Change History ***********************************/
/* Date Version Author Description */
/* 15-04-2011 1.00 Lakshmi Draft version */
-- Global Specifications.
package_name_in VARCHAR2(50) :='ODS_ACCOUNT';
v_cntl_schema VARCHAR2(30) :='SCNTL02';
v_location INTEGER := 10;
-- Procedure Specifications.
PROCEDURE INSERT_SURR_ACCTS (job_name_in IN VARCHAR2,
proc_cd_in IN VARCHAR2,
proc_step_cd_in IN VARCHAR2,
bch_dte_in IN DATE,
fl_nbr_in IN NUMBER,
verbose_log_flag_in IN INTEGER,
pred_check_req_in IN INTEGER,
ibd_id_in IN NUMBER,
proc_step_status_out OUT INTEGER,
sp_hier_inout IN OUT VARCHAR2);
END ODS_ACCOUNT;
CREATE OR REPLACE PACKAGE BODY SEODS02.ODS_ACCOUNT
AS
Procedure Name : INSERT_SURR_ACCTS
Description : This procedure will be called to move the data from
ACCT_ALT_ID_STG (staging) table to ACCT_ALT_ID table
and EODS_ACCT table for all new accounts.
Release Date : 27 MAY 2011
Created By : C2119810
PROCEDURE INSERT_SURR_ACCTS (job_name_in IN VARCHAR2,
proc_cd_in IN VARCHAR2,
proc_step_cd_in IN VARCHAR2,
bch_dte_in IN DATE,
fl_nbr_in IN NUMBER,
verbose_log_flag_in IN INTEGER,
pred_check_req_in IN INTEGER,
ibd_id_in IN NUMBER,
proc_step_status_out OUT INTEGER,
sp_hier_inout IN OUT VARCHAR2)
AS
/* Local Variables Declaration*/
v_curr_date DATE := CURRENT_DATE;
procedure_name_in VARCHAR2(30) := 'INSERT_SURR_ACCTS';
stat_code_in VARCHAR2(30);
proc_step_start_out NUMBER(1);
proc_step_upd_out NUMBER(1);
error_msg_in VARCHAR2(1000);
option_in VARCHAR2(30);
v_cmit_nbr NUMBER(8);
v_query VARCHAR2(10000);
v_actl_inpt_cnt NUMBER(10):=0;
v_rec_inserted_cnt_in NUMBER(10):=0;
v_rec_errored_cnt_in NUMBER(10):=0;
v_proc_step_upd_out NUMBER(1);
handled_exception EXCEPTION;
CURSOR c1 IS
SELECT *
FROM acct_alt_id_stg
WHERE fl_nbr = fl_nbr_in AND
alt_acct_rec_proc_flag = 'N' AND
eods_acct_rec_proc_flag = 'N' AND
to_date(bch_dte,'DD-MON-YY') <= bch_dte_in;
TYPE sttg_cursor IS TABLE OF acct_alt_id_stg%ROWTYPE;
sttg_array sttg_cursor;
BEGIN
/* Enable the logging if verbose log flag is 0*/
IF verbose_log_flag_in = 0 THEN
DBMS_OUTPUT.ENABLE();
ELSE
DBMS_OUTPUT.DISABLE();
END IF;
/* Start the Insert Surrogate Accounts process step after all the predecessor process steps are complete */
ODS_CONTROL_UTILITY.PROC_STEP_START( proc_cd_in => proc_cd_in,
proc_step_cd_in => proc_step_cd_in,
ibd_id_in => ibd_id_in,
bch_dte_in => bch_dte_in,
job_name_in => job_name_in,
verbose_log_flag_in => verbose_log_flag_in,
pred_chk_reqd_in => pred_check_req_in,
proc_step_stat_out => proc_step_start_out,
sp_hier_inout => sp_hier_inout);
IF proc_step_start_out = 0 THEN
dbms_output.put_line('Process Step '|| proc_step_cd_in ||' started for Process '||proc_cd_in);
error_msg_in := 'Error in reading Commit point';
v_query := 'SELECT proc_cmit_nbr FROM '||v_cntl_schema||'.proc
WHERE proc_id = '|| chr(39) || proc_cd_in || chr(39) ||
' AND ibd_id = '|| ibd_id_in;
EXECUTE IMMEDIATE v_query INTO v_cmit_nbr;
dbms_output.put_line('Comit point number is : '||v_cmit_nbr);
OPEN c1;
LOOP
FETCH c1 BULK COLLECT INTO sttg_array LIMIT v_cmit_nbr;
FOR i IN 1..sttg_array.COUNT LOOP
error_msg_in := 'Error in inserting ACCT_ALT_ID table';
INSERT INTO acct_alt_id (acct_alt_id, ibd_id, acct_alt_id_cntx_cde, eods_acct_id, data_grp_cde, crte_pgm, crte_tstp, updt_pgm, updt_tstp)
VALUES (sttg_array(i).acct_alt_id, sttg_array(i).ibd_id, sttg_array(i).acct_alt_id_cntx_cde, seq_eods_acct_id.nextval, sttg_array(i).data_grp_cde, job_name_in, v_curr_date, job_name_in, v_curr_date);
error_msg_in := 'Error in inserting EODS_ACCT table';
INSERT INTO eods_acct (eods_acct_id, acct_typ_cde, data_grp_cde, updt_dte)
VALUES (seq_eods_acct_id.currval, sttg_array(i).acct_typ_cde, sttg_array(i).data_grp_cde, v_curr_date);
error_msg_in := 'Error in Updating process flag in ACCT_ALT_ID_STG table';
UPDATE acct_alt_id_stg
SET alt_acct_rec_proc_flag = 'Y',
eods_acct_rec_proc_flag = 'Y',
updt_pgm = job_name_in,
updt_tstp = v_curr_date
WHERE acct_alt_id = sttg_array(i).acct_alt_id
AND acct_alt_id_cntx_cde = sttg_array(i).acct_alt_id_cntx_cde
AND fl_nbr = sttg_array(i).fl_nbr;
/*Incrementing the count of records inserted*/
v_actl_inpt_cnt := v_actl_inpt_cnt + 1;
v_rec_inserted_cnt_in := v_rec_inserted_cnt_in + 1;
END LOOP;
EXIT WHEN c1%NOTFOUND;
END LOOP;
CLOSE c1;
/* Update the count of records inserted and total processed count to proc_step_exec table. */
ODS_CONTROL_UTILITY.PROC_STEP_UPDATE (proc_cd_in => proc_cd_in,
proc_step_cd_in => proc_step_cd_in,
ibd_id_in => ibd_id_in,
bch_dte_in => bch_dte_in,
job_name_in => job_name_in,
status_in => 'IN PROCESS',
rec_inserted_cnt_in => v_rec_inserted_cnt_in,
actl_inpt_cnt_in => v_actl_inpt_cnt,
verbose_log_flag_in => verbose_log_flag_in,
pred_chk_reqd_in => pred_check_req_in,
proc_step_upd_out => proc_step_upd_out,
sp_hier_inout => sp_hier_inout);
IF proc_step_upd_out = 0 THEN
COMMIT;
ELSE
error_msg_in := 'Issue in updating process step '||proc_step_cd_in||' for process '||proc_cd_in;
option_in := 'proc_step';
v_location := 30;
RAISE handled_exception;
END IF;
ODS_CONTROL_UTILITY.PROC_STEP_UPDATE (proc_cd_in => proc_cd_in,
proc_step_cd_in => proc_step_cd_in,
ibd_id_in => ibd_id_in,
bch_dte_in => bch_dte_in,
job_name_in => job_name_in,
status_in => 'COMPLETED',
verbose_log_flag_in => verbose_log_flag_in,
pred_chk_reqd_in => pred_check_req_in,
proc_step_upd_out => v_proc_step_upd_out,
sp_hier_inout => sp_hier_inout);
IF v_proc_step_upd_out = 0 THEN
COMMIT;
dbms_output.put_line('Data has been successfully inserted into ACCT_ALT_ID and EODS_ACCT tables');
proc_step_status_out := 0;
ELSE
error_msg_in := 'Issue in ending process step for process ' || proc_cd_in || ' and process step '|| proc_step_cd_in;
option_in := 'others';
v_location := 40;
RAISE handled_exception;
END IF;
ELSE
error_msg_in := 'Issue in starting the process step for process ' || proc_cd_in || ' and process step '|| proc_step_cd_in;
option_in := 'others';
RAISE handled_exception;
END IF;
EXCEPTION
WHEN handled_exception THEN
IF c1%ISOPEN THEN
CLOSE c1;
END IF;
ROLLBACK;
DBMS_OUTPUT.ENABLE();
ODS_CONTROL_UTILITY.COMM_SP_EXCEP_HNDLR(package_name_in => package_name_in,
procedure_name_in => procedure_name_in,
location_in => v_location,
error_mesg_in => error_msg_in,
proc_cd_in => proc_cd_in,
proc_step_cd_in => proc_step_cd_in,
ibd_id_in => ibd_id_in,
option_in => option_in,
job_name_in => job_name_in,
bch_dte_in => bch_dte_in,
sp_hier_inout => sp_hier_inout);
sp_hier_inout :=
CASE
WHEN sp_hier_inout IS NULL THEN package_name_in || '.' || procedure_name_in
WHEN sp_hier_inout IS NOT NULL THEN package_name_in || '.' || procedure_name_in || '-->' || sp_hier_inout
END;
proc_step_status_out := 1;
WHEN OTHERS THEN
IF c1%ISOPEN THEN
CLOSE c1;
END IF;
ROLLBACK;
error_msg_in := error_msg_in||' : '||SQLCODE || ' : '||SQLERRM;
DBMS_OUTPUT.ENABLE();
option_in := 'proc_step';
ODS_CONTROL_UTILITY.COMM_SP_EXCEP_HNDLR(package_name_in => package_name_in,
procedure_name_in => procedure_name_in,
location_in => v_location,
error_mesg_in => error_msg_in,
proc_cd_in => proc_cd_in,
proc_step_cd_in => proc_step_cd_in,
ibd_id_in => ibd_id_in,
option_in => option_in,
job_name_in => job_name_in,
bch_dte_in => bch_dte_in,
sp_hier_inout => sp_hier_inout);
sp_hier_inout :=
CASE
WHEN sp_hier_inout IS NULL THEN package_name_in || '.' || procedure_name_in
WHEN sp_hier_inout IS NOT NULL THEN package_name_in || '.' || procedure_name_in || '-->' || sp_hier_inout
END;
proc_step_status_out := 1;
END INSERT_SURR_ACCTS;
END ODS_ACCOUNT;
/

I assume that the parts taking time are in the
FOR i IN 1..sttg_array.COUNT LOOP In here you do 2 INSERTs and an UPDATE for every loop...
If you LOOP 1 Mill tiimes (how many??) then you do 2 Mill single inserts and 1Mill sinlge UPDATES.
A trace with TKPROF will tell you details.
You better do an INSERT ALL to do the two inserts and a MERGE to do the UDPATE. NO LOOP!!! That will reduce the code and maximize performance by a magniture.

Similar Messages

  • Any suggestions about a program to rip my dvd's???

    I have a 30 gb ipod video and i would like to watch movies on it. Any suggestions to any good programs i could download ( FOR FREE!!! )
    thanks

    mabey this y cant u just purchase a program?
    Nano 4GB black,Moto RAZR V3 black, PSP, all kinds of cases for nano,radio/remote   Windows XP   <img src="http://i36.photobucket.com/albums/e13/superman5656/s.gif"align="right"</span>

  • I can't access any mote to a WD MY Book (WD5000H1Q). Does anyone have any suggestion about this issue?

    I cannot acces any moto to a WD MY Book (WD5000H1Q). After upgrading to Lions It worked for a couple of days. Does anyone have some suggestion on this issue?

    Do you see it on your desktop as an icon?

  • Any comments about this code regaarding naming conventions and flow and e

    CREATE OR REPLACE PACKAGE SEODS02.ODS_APPEND_REPLACE
    AS
    /* Description : This procedure will start the process step for moving
    data from staging to live table for Append and Replace paradigms
    /**************** Change History ***********************************/
    /* Date Version Author Description */
    -- Global Specifications.
    package_name_in VARCHAR2(50) :='ODS_APPEND_REPLACE';
    v_location INTEGER := 10;
    v_cntl_schema VARCHAR2(20):= 'SCNTL02';
    -- Procedure Specifications.
    PROCEDURE APPEND_REPLACE_INSERT (job_name_in IN VARCHAR2,
    schema_name_in IN VARCHAR2,
    proc_cd_in IN VARCHAR2,
    proc_step_cd_in IN VARCHAR2,
    bch_dte_in IN DATE,
    fl_nbr_in IN VARCHAR2,
    verbose_log_flag_in IN INTEGER,
    pred_check_req_in IN INTEGER,
    error_code_1_in IN VARCHAR2,
    ibd_id_in IN INTEGER,
    proc_step_status_out OUT INTEGER,
    sp_hier_inout IN OUT VARCHAR2);
    PROCEDURE APPEND_EXPOSE (job_name_in IN VARCHAR2,
    schema_name_in IN VARCHAR2,
    proc_cd_in IN VARCHAR2,
    proc_step_cd_in IN VARCHAR2,
    bch_dte_in IN DATE,
    data_grp_cde_in IN VARCHAR2,
    verbose_log_flag_in IN INTEGER,
    pred_check_req_in IN INTEGER,
    ibd_id_in IN INTEGER,
    proc_step_status_out OUT INTEGER,
    sp_hier_inout IN OUT VARCHAR2);
    END ODS_APPEND_REPLACE;
    CREATE OR REPLACE
    PACKAGE BODY SEODS02.ODS_APPEND_REPLACE
    AS
    PROCEDURE APPEND_REPLACE_INSERT (job_name_in IN VARCHAR2,
    schema_name_in IN VARCHAR2,
    proc_cd_in IN VARCHAR2,
    proc_step_cd_in IN VARCHAR2,
    bch_dte_in IN DATE,
    fl_nbr_in IN VARCHAR2,
    verbose_log_flag_in IN INTEGER,
    pred_check_req_in IN INTEGER,
    error_code_1_in IN VARCHAR2,
    ibd_id_in IN INTEGER,
    proc_step_status_out OUT INTEGER,
    sp_hier_inout IN OUT VARCHAR2)
    AS
    /* Local Variables Declaration*/
    v_curr_date DATE := CURRENT_DATE;
    v_procedure_name VARCHAR2(100):= 'APPEND_REPLACE_INSERT';
    v_stg_tbl VARCHAR2(100);
    v_act_tbl VARCHAR2(100);
    v_whr_clause_out VARCHAR2(1000);
    option_in VARCHAR2(30);
    v_common_col_list VARCHAR2(10000);
    v_stg_col_list VARCHAR2(10000);
    v_act_col_list VARCHAR2(10000);
    v_query VARCHAR2(10000);
    v_thrshld_query VARCHAR2(10000);
    v_actl_inpt_query VARCHAR2(10000);
    v_proc_step_stat_query VARCHAR2(10000);
    v_error_msg_in VARCHAR2(10000);
    v_part_val_out INTEGER;
    v_row_cnt NUMBER(10);
    v_cmit_nbr NUMBER(10);
    v_actl_inpt_cnt NUMBER(10);
    v_rec_inserted_cnt NUMBER(10);
    v_rec_errored_cnt NUMBER(10);
    v_thrshld_nbr NUMBER(10);
    v_data_grp_query VARCHAR2(10000);
    v_data_grp_cde VARCHAR2(30);
    v_proc_step_upd_out NUMBER(1);
    proc_step_start_out NUMBER(1);
    proc_step_status VARCHAR2(30);
    handled_exception EXCEPTION;
    BEGIN
    /* Enable the logging if verbose log flag is 0*/
    IF verbose_log_flag_in = 0 THEN
    DBMS_OUTPUT.ENABLE();
    ELSE
    DBMS_OUTPUT.DISABLE();
    END IF;
    /* Start the Append/Replace Update process step after all the predecessor process steps are complete */
    ODS_CONTROL_UTILITY.PROC_STEP_START( proc_cd_in => proc_cd_in,
    proc_step_cd_in => proc_step_cd_in,
    ibd_id_in => ibd_id_in,
    bch_dte_in => bch_dte_in,
    job_name_in => job_name_in,
    verbose_log_flag_in => verbose_log_flag_in,
    pred_chk_reqd_in => pred_check_req_in,
    proc_step_stat_out => proc_step_start_out,
    sp_hier_inout => sp_hier_inout);
    IF proc_step_start_out = 0 THEN
    dbms_output.put_line('Process Step '|| proc_step_cd_in ||' started for Process '||proc_cd_in);
    /*If process step is successfully started then get the active and stage table names */
    ODS_CONTROL_UTILITY.GET_TABLE_NAME( proc_cd_in => proc_cd_in,
    proc_step_in => proc_step_cd_in,
    ibd_id_in => ibd_id_in,
    actv_tbl_out => v_act_tbl,
    stg_tbl_out => v_stg_tbl,
    sp_hier_inout => sp_hier_inout);
    IF v_act_tbl IS NULL THEN
    v_error_msg_in := 'Active table name is null. Please check the parameters passed';
    option_in := 'others';
    RAISE handled_exception;
    /* If Active table is not null then get the active partition of the table*/
    ELSE
    dbms_output.put_line('Active table name is : '||v_act_tbl);
    v_data_grp_query := 'SELECT data_grp_cde
    FROM '||v_cntl_schema ||'.proc
    WHERE proc_id = '||chr(39)||proc_cd_in ||chr(39)||
    ' AND ibd_id = '||ibd_id_in;
    EXECUTE IMMEDIATE v_data_grp_query INTO v_data_grp_cde;
    ODS_CONTROL_UTILITY.GET_ACT_PART(tbl_name_in => v_act_tbl,
    data_grp_cde_in => v_data_grp_cde,
    meta_data_in => 'VIEW DYN METADATA',
    part_val_out => v_part_val_out,
    sp_hier_inout => sp_hier_inout);
    IF v_part_val_out IS NULL THEN
    v_error_msg_in := 'Incorrect table name ' || v_act_tbl;
    option_in := 'others';
    v_location := 20;
    RAISE handled_exception;
    END IF;
    dbms_output.put_line('Active partition for the table '|| v_act_tbl ||' is : '||v_part_val_out);
    /*Get the list of active table columns*/
    ODS_APPLICATION_UTILITY.GET_TAB_COLS (schema_name_in => schema_name_in,
    table_name_in => v_act_tbl,
    col_name_out => v_act_col_list,
    sp_hier_inout => sp_hier_inout);
    v_act_col_list := SUBSTR(v_act_col_list,1,LENGTH(v_act_col_list)-1);
    IF v_act_col_list IS NULL THEN
    v_error_msg_in := 'Failed fetching columns for ' || v_act_tbl || '. Check for the columns in table name';
    option_in := 'others';
    v_location := 30;
    RAISE handled_exception;
    /*Get the list of active table columns and concatenate the columns with 'stg_array(i)' */
    ELSE
    dbms_output.put_line('Active Table Columns List: '||v_act_col_list);
    ODS_APPLICATION_UTILITY.GET_TAB_COLS (schema_name_in => schema_name_in,
    table_name_in => v_act_tbl,
    identifier_name_in => 'stg_array(i)',
    col_name_out => v_common_col_list,
    sp_hier_inout => sp_hier_inout);
    v_common_col_list := SUBSTR(v_common_col_list,1,LENGTH(v_common_col_list)-1);
    IF v_common_col_list IS NULL THEN
    v_error_msg_in := 'Failed fetching columns for ' || v_act_tbl || ' and get concatenated with ' || 'STTG_ARRAY' ||'. Check for the columns in table name';
    option_in := 'others';
    v_location := 40;
    RAISE handled_exception;
    ELSE
    ODS_APPLICATION_UTILITY.GET_TAB_COLS (schema_name_in => schema_name_in,
    table_name_in => v_stg_tbl,
    col_name_out => v_stg_col_list,
    sp_hier_inout => sp_hier_inout);
    v_stg_col_list := SUBSTR(v_stg_col_list,1,LENGTH(v_stg_col_list)-1);
    IF v_stg_col_list IS NULL THEN
    v_error_msg_in := 'Failed fetching columns for ' || v_stg_tbl || '. Check for the columns in table name';
    option_in := 'others';
    v_location := 50;
    RAISE handled_exception;
    ELSE
    /* Form the WHERE clause on the primary key columns to update the proc_flag
    column of appropriate record in stage table */
    ODS_APPLICATION_UTILITY.GET_WHERE_CLAUSE( schema_nme_in => schema_name_in,
    tbl_nme_in => v_stg_tbl,
    trg_id => 'stg_array(i)',
    whr_clause_out => v_whr_clause_out,
    sp_hier_inout => sp_hier_inout);
    IF v_whr_clause_out IS NULL THEN
    v_error_msg_in := 'No columns fetched for ' || v_stg_tbl || '. Check for the columns in table name';
    option_in := 'others';
    v_location := 60;
    RAISE handled_exception;
    ELSE
    dbms_output.put_line('Where Clause is : ' || v_whr_clause_out );
    v_thrshld_query := 'SELECT proc_step_thrshld_nbr FROM '|| v_cntl_schema ||'.proc_step
    WHERE proc_id = '|| chr(39) ||proc_cd_in|| chr(39) ||
    ' AND proc_step_cde = '|| chr(39) ||proc_step_cd_in|| chr(39) ||
    ' AND ibd_id = ' || ibd_id_in;
    EXECUTE IMMEDIATE v_thrshld_query INTO v_thrshld_nbr;
    dbms_output.put_line('Threshold number for the process step '||proc_step_cd_in||' is '||v_thrshld_nbr||' for the process '||proc_cd_in);
    END IF;
    END IF;
    END IF;
    END IF;
    END IF;
    v_query := 'SELECT proc_cmit_nbr FROM '||v_cntl_schema||'.proc
    WHERE proc_id = '|| chr(39) || proc_cd_in || chr(39) ||
    ' AND ibd_id = '|| ibd_id_in;
    EXECUTE IMMEDIATE v_query INTO v_cmit_nbr;
    IF v_part_val_out = 999 THEN
    /* Execute the dynamic pl/sql block to append the data to the active table*/
    dbms_output.put_line('Executing Dynamic Insert Block for Append Paradigm');
    dbms_output.put_line('--------------------------------------------------');
    v_location := 80;
    EXECUTE IMMEDIATE q'{
    DECLARE
    v_rec_inserted_cnt_in NUMBER(10):=0;
    error_msg_in VARCHAR2(1000);
    v_dyn_proc_step_upd_out NUMBER(1);
    v_rec_updt_cnt_in NUMBER(10):=0;
    v_actl_inpt_cnt NUMBER(10):=0;
    v_rec_errored_cnt_in NUMBER(10):=0;
    v_dyn_option_in VARCHAR2(30);
    v_dyn_sp_hier VARCHAR2(30);
    v_dyn_handled_exception EXCEPTION;
    v_dyn_verbose_flag NUMBER(1):=0;
    CURSOR c IS
    SELECT }' || v_stg_col_list ||
    ' FROM ' || v_stg_tbl ||
    ' WHERE fl_nbr = ' || fl_nbr_in ||
    ' AND proc_flag = ' || chr(39) || 'N' || chr(39) ||
    ' AND to_date(bch_dte,'||CHR(39)||'DD-MON-YY'||CHR(39)||') <= '||CHR(39)|| bch_dte_in || CHR(39)||q'{;
    TYPE array IS TABLE OF c%ROWTYPE;
    stg_array array;
    BEGIN
    /* Enable the logging if verbose log flag is 0*/
    IF v_dyn_verbose_flag = }' || verbose_log_flag_in || q'{ THEN
    DBMS_OUTPUT.ENABLE();
    END IF;
    OPEN c;
    LOOP
    FETCH c BULK COLLECT INTO stg_array LIMIT }'|| v_cmit_nbr ||q'{;
    FOR i IN 1..stg_array.COUNT LOOP
    BEGIN
    INSERT INTO }' || schema_name_in || q'{.}'|| v_act_tbl || q'{( }'|| v_act_col_list ||q'{,crte_pgm, updt_pgm, crte_tstp, updt_tstp, expsd_rec_ind) VALUES }' || q'{ ( }' || v_common_col_list || q'{,'}' || job_name_in || q'{','}' || job_name_in ||q'{','}' || v_curr_date ||q'{','}' || v_curr_date||q'{','N' );}' ||
    q'{
    v_rec_inserted_cnt_in := v_rec_inserted_cnt_in + 1 ;
    v_actl_inpt_cnt := v_actl_inpt_cnt + 1 ;
    error_msg_in := 'Error in updating PROC_STAT as inserted';
    UPDATE }' || schema_name_in || q'{.}' || v_stg_tbl || q'{
    SET proc_flag = 'I' ,
    updt_pgm = '}' || job_name_in || q'{',
    updt_tstp = '}' || v_curr_date || q'{'
    WHERE }'|| v_whr_clause_out ||q'{;
    EXCEPTION
    WHEN DUP_VAL_ON_INDEX THEN
    error_msg_in := 'Record duplicated';
    v_actl_inpt_cnt := v_actl_inpt_cnt + 1 ;
    v_rec_errored_cnt_in := v_rec_errored_cnt_in + 1;
    IF v_rec_errored_cnt_in >}' || v_thrshld_nbr || q'{ THEN
    error_msg_in := 'Threshold limit }' || v_thrshld_nbr || q'{ Reached';
    v_dyn_option_in := 'proc_step';
    RAISE v_dyn_handled_exception;
    ELSE
    error_msg_in := 'Error in updating PROC_STAT as error';
    UPDATE }' || schema_name_in || q'{.}' || v_stg_tbl || q'{
    SET proc_flag = 'E',
    -- err_code = }' || error_code_1_in || q'{, --need to uncomment once the err_code column is created in stage table
    updt_pgm = '}' || job_name_in || q'{',
    updt_tstp = '}' || v_curr_date || q'{'
    WHERE }'|| v_whr_clause_out ||q'{;
    END IF;
    END;
    END LOOP;
    EXIT WHEN c%NOTFOUND;
    END LOOP;
    CLOSE c;
    ND ODS_APPEND_REPLACE;
    /

    DUPLICATE
    Any suggestions about this program to improve performance and effective cod

  • I am novice to LabView programmin​g. Any suggestion about the the good programmin​g style will be of great help. Thanks.

    I just wrote a small program for reading a ASCII file and writting the numbers to Arrays. Files are enclosed for reference. Any suggestion about the programming style quality or what is the best way for LabView programming will be of great help. Thanks in advance.
    Attachments:
    Reading_Text_File_into_Array.vi ‏32 KB
    37a8176a.cr5 ‏1 KB

    I'm home from work today so ... here's my modification to your VI. Use it with you existing data. As you get more exposed to LV's existing tools, you'll discover the shortcuts. No loops are necessary for your task.
    Hope this helps.
    - Kevin
    Attachments:
    Reading_Text_File_into_Array_New.vi ‏47 KB

  • I would like to get certified for the SAP Crystal Reports. So, I would like to get some info about the currently available Certification Exams for Crystal Reports (2011/2013). Also, would greatly appreciate  if you have any suggestions for thi

    Hi,
            I would like to get certified for the SAP Crystal Reports. So, I would like to get some info about the currently available Certification Exams for Crystal Reports (2011/2013). Also, would greatly appreciate  if you have any suggestions for this Certification Exam preparation materials from another 3rd party or from SAP directly .  I would like to prepare or get trained well before taking the exam as I see it costs around $500.
    Thanks in advance for your help in this regard!
    Sincerely,
    J

    Please search here.. Training and Certification Shop for your desired certification or training. Don't forget to set your location.
    Please use some summarized title for your query.

  • Iphoto causes half my screen to be reversed (screen split with the right side half now on the left side) and computer freezes. Any suggestions about a fix?

    iphoto causes half my screen to be reversed (screen split with the right side half now on the left side and the left hand side on the right.) and screen gets multiple blurry copies. Also the computer freezes. Any suggestions about a fix? Can I delete iphoto and reinstall? If so, will I lose my photos?

    Please post a screenshot that shows what you mean. Be careful not to include any private information.
    Start a reply to this message. Click the camera icon in the toolbar of the editing window and select the image file to upload it. You can also include text in the reply.

  • I am not able to access the App Store on my Iphone 3GS with IOS 6.01, however i can access the same on my laptop when i connect my phone to my PC. Any suggestions on this.

    I am not able to access the App Store on my Iphone 3GS with IOS 6.01, however i can access the same on my laptop when i connect my phone to my PC. Any suggestions on this.

    varunsharmaapplefan
    http://support.apple.com/kb/ht5209 might help you.  An iPhone 4 can airplay content from apps that support airplay and iTunes but it cannot mirror.  If your game does not have airplay in the app you cannot mirror it to the apple TV so I don't know if you can play just the music.  You should have no problem playing your iTunes over airplay though.
    This may also help http://support.apple.com/kb/HT4437
    Regards
    Jules 

  • I am using PP 2014 CC and it and or Encoder keep crashing.. using iMac computer with Yosemite OS anyone have any ideas about this issue?

    I am using PP 2014 CC and it and or Encoder keep crashing.. using iMac computer with Yosemite OS anyone have any ideas about this issue?

    Hi,
    Please give this a try: Premiere Pro CC, CC 2014, or 2014.1 freezing on startup or crashing while working (Mac OS X 10.9, and later)
    Thanks,
    Rameez

  • My ipad was stolen today in China today. Any suggestions about police report?

    They haven been connected to a wireless network. Ialready sent the wipe order. Any suggestions about police report with serial ?

    It's doubtful you'll get it back.
    Report to police along with serial number. Change all your passwords.
    These links may be helpful.
    How to Track and Report Stolen iPad
    http://www.ipadastic.com/tutorials/how-to-track-and-report-stolen-ipad
    Reporting a lost or stolen Apple product
    http://support.apple.com/kb/ht2526
    Report Stolen iPad Tips and iPad Theft Prevention
    http://www.stolen-property.com/report-stolen-ipad.php
    How to recover a lost or stolen iPad
    http://ipadhelp.com/ipad-help/how-to-recover-a-lost-or-stolen-ipad/
    How to Find a Stolen iPad
    http://www.ehow.com/how_7586429_stolen-ipad.html
    Apple Product Lost or Stolen
    http://sites.google.com/site/appleclubfhs/support/advice-and-articles/lost-or-st olen
    Oops! iForgot My New iPad On the Plane; Now What?
    http://online.wsj.com/article/SB10001424052702303459004577362194012634000.html
    If you don't know your lost/stolen iPad's serial number, use the instructions below. The S/N is also on the iPad's box.
    How to Find Your iPad Serial Number
    http://www.ipadastic.com/tutorials/how-to-find-your-ipad-serial-number
    iOS: How to find the serial number, IMEI, MEID, CDN, and ICCID number
    http://support.apple.com/kb/HT4061
     Cheers, Tom

  • I'm new to Macbook Pro, and never imagined I would have problems saving bookmarks when I switched to Mac.  Any suggestions with this issue?  And has Apple come up with a permanent fix?

    I'm new to Macbook Pro, and never imagined I would have problems saving bookmarks when I switched to Mac.  Any suggestions with this issue?  I have Safari 6.0.4, and has Apple come up with a permanent fix?

    Triple-click the line below to select it:
    ~/Library/Safari/Bookmarks.plist
    Right-click or control-click the highlighted line and select
    Services ▹ Show Info
    from the contextual menu.* An Info dialog should open.
    Does the dialog show "You can read and write" in the Sharing & Permissions section?
    In the General section, is the box labeled Locked checked?
    What is the Modified date?
    *If you don't see the contextual menu item, copy the selected text to the Clipboard (command-C). Open a TextEdit window and paste into it (command-V). Select the line you just pasted and continue as above.

  • IPhone music will not respond to Play button after being paused. The same music is on my iPad and MacBook Pro without problems. Any suggestions about cause and solution.

    iPhone music will not respond to Play button after being paused.
    The same music is on my iPad and MacBook Pro without problems. Any suggestions about cause and solution.

    Do a
    Reset: Hold down the Sleep/Wake button and the Home button at the same time for at least ten seconds, until the Apple logo appears. Note: You will not lose any data

  • Hello! i am new to Macbook pro, i have recently transferred my data from my Pc to Mac, i can not open .exe file. Please give me any suggestion regarding this!

    hello! i am new to Macbook pro, i have recently transferred my data from my Pc to Mac, i can not open .exe file. Please give me any suggestion regarding this!
    I have using Mac OS 10.9.2

    Try running it through WineSkin or CrossOver Mac, or installing Windows through VirtualBox, Parallels Desktop, VMware Fusion, Boot Camp, or similar software.
    (106527)

  • I have selected calendars on my iPhone and macbook to synch with icloud. This works if I enter items on the phone, but not if they are entered on the macbook. Any suggestions why this is happening and how to fix it?

    I have selected calendars on my iphone and macbook to synch using icloud. If I enter an item on the iphone, it appears on the macbook calendar but not the other way round. Any suggestions why this is happening and how to fix it?

    Dartiesdad wrote:
    Hmmmm  Snow Leopard and iCloud.... not usually workable but here is an article that might be helpful.
    http://reviews.cnet.com/8301-13727_7-57511534-263/how-to-set-up-icloud-services- in-snow-leopard/
    10.7.5 is not Snow Leopard so we have to wait and see, the answers to the question I asked will define what it really is.

  • I have problem with my I PHONE 4S  Always its time out then i must restart my I phone please any help about this case ??

    i have problem with my I PHONE 4S  Always its time out then i must restart my I phone please any help about this case ??

    Hello Pllumb,
    It sounds like you are unable to turn on Wi-Fi because the option is grayed out in Settings. Use these steps from the following article named:
    iOS: Wi-Fi settings grayed out or dim
    http://support.apple.com/kb/ts1559
    Restart your iOS device.
    Make sure that airplane mode is off by tapping Settings > Airplane Mode.
    Reset the network settings by tapping Settings > General > Reset > Reset Network Settings.
    This will reset all network settings, including Bluetooth pairing records, Wi-Fi passwords, VPN, and APN settings.
    Make sure that your device is using the latest software. To do so, connect your device to your computer and check for updates in iTunes.
    If you still can't turn Wi-Fi on, please contact Apple for support and service options. If you can turn Wi-Fi on but are experiencing other issues with Wi-Fi, please see these steps.
    Thank you for using Apple Support Communities.
    All the very best,
    Sterling

Maybe you are looking for