10345: -- Get all the records from hercules view whose timestamp is > passed timestamp
10346: -- or get all the records in hercules view if the timestamp passed is null
10347: CURSOR c_stmt (p_timestamp igs_uc_hrc_timstmps.timestamp%TYPE ) IS
10348: SELECT appno,statement
10349: FROM igs_uc_ivnstatement_2006_v
10350: WHERE ( timestamp > p_timestamp OR p_timestamp IS NULL ) ;
10351:
10352: -- get the max timestamp value of the hercules view
10353: CURSOR c_max_timestamp IS
10351:
10352: -- get the max timestamp value of the hercules view
10353: CURSOR c_max_timestamp IS
10354: SELECT MAX(timestamp)
10355: FROM igs_uc_ivnstatement_2006_v ;
10356:
10357: -- Variables
10358: p_old_timestamp igs_uc_hrc_timstmps.timestamp%TYPE ;
10359: l_new_max_timestamp igs_uc_ivnstatement_2006_v.timestamp%TYPE ;
10355: FROM igs_uc_ivnstatement_2006_v ;
10356:
10357: -- Variables
10358: p_old_timestamp igs_uc_hrc_timstmps.timestamp%TYPE ;
10359: l_new_max_timestamp igs_uc_ivnstatement_2006_v.timestamp%TYPE ;
10360: l_count NUMBER ;
10361:
10362: l_appno igs_uc_istmnt_ints.appno%TYPE;
10363: l_checkdigit NUMBER;