DBA Data[Home] [Help]

APPS.OKI_LOAD_SGR_PVT SQL Statements

The following lines contain the word 'select', 'insert', 'update' or 'delete':

Line: 63

    SELECT rowid
    FROM   oki_seq_growth_rate sgr
    WHERE  sgr.period_set_name       = p_period_set_name
    AND    sgr.period_name           = p_period_name
    AND    sgr.authoring_org_id      = p_authoring_org_id
    AND    sgr.seq_grw_rate_code     = p_seq_grw_rate_code
    AND    sgr.scs_code              = p_scs_code
    AND    sgr.customer_party_id     = p_customer_party_id
    AND    sgr.product_category_code = p_product_category_code
    AND    sgr.summary_build_date    = p_summary_build_date
    AND    sgr.period_type           = p_period_type
    ;
Line: 86

    SELECT NVL(SUM(base_contract_amount), 0) base_contract_amount
         , NVL(SUM(sob_contract_amount), 0) sob_contract_amount
    FROM   oki_sales_k_hdrs shd
    WHERE  shd.date_signed   <= p_summary_build_date
    AND    shd.date_approved <= p_summary_build_date
    AND    shd.start_date    <= p_summary_build_date
    AND    shd.end_date       > p_summary_build_date
    AND    (   shd.date_terminated IS NULL
            OR shd.date_terminated  > p_summary_build_date)
    AND    shd.base_contract_amount
                 BETWEEN 0 AND oki_load_sgr_pvt.g_problem_k_threshold
    ;
Line: 108

    SELECT NVL(SUM(base_contract_amount), 0) base_contract_amount
         , NVL(SUM(sob_contract_amount), 0) sob_contract_amount
    FROM   oki_sales_k_hdrs shd
    WHERE  shd.date_signed   <= p_glpr_qtr_end_date
    AND    shd.date_approved <= p_glpr_qtr_end_date
    AND    shd.end_date BETWEEN p_glpr_qtr_start_date
                            AND p_glpr_qtr_end_date
    AND    (   shd.date_terminated IS NULL
            OR shd.date_terminated  > p_summary_build_date)
    AND    shd.base_contract_amount
                 BETWEEN 0 AND oki_load_sgr_pvt.g_problem_k_threshold
    ;
Line: 129

    SELECT NVL(SUM(base_contract_amount), 0) base_contract_amount
         , NVL(SUM(sob_contract_amount), 0) sob_contract_amount
    FROM   oki_sales_k_hdrs shd
    WHERE  shd.is_new_yn       IS NULL
    AND    shd.date_signed     IS NOT NULL
    AND    shd.date_approved   IS NOT NULL
    AND    shd.start_date BETWEEN p_glpr_qtr_start_date
                                     AND p_summary_build_date
    AND    GREATEST(shd.date_signed, shd.date_approved)
              BETWEEN p_glpr_qtr_start_date
                  AND p_summary_build_date
    AND    shd.base_contract_amount
                 BETWEEN 0 AND oki_load_sgr_pvt.g_problem_k_threshold
    ;
Line: 152

    SELECT NVL(SUM(base_contract_amount), 0) base_contract_amount
         , NVL(SUM(sob_contract_amount), 0) sob_contract_amount
    FROM   oki_sales_k_hdrs shd
    WHERE  shd.is_new_yn     IS NULL
    AND    shd.date_signed   IS NOT NULL
    AND    shd.date_approved IS NOT NULL
    AND    shd.start_date     < p_glpr_qtr_start_date
    AND    GREATEST(shd.date_signed, shd.date_approved)
              BETWEEN p_glpr_qtr_start_date
                  AND p_summary_build_date
    AND    shd.base_contract_amount
                 BETWEEN 0 AND oki_load_sgr_pvt.g_problem_k_threshold
    ;
Line: 174

    SELECT NVL(SUM(base_contract_amount), 0) base_contract_amount
         , NVL(SUM(sob_contract_amount), 0) sob_contract_amount
    FROM   oki_sales_k_hdrs shd
    WHERE  shd.date_signed   <= p_summary_build_date
    AND    shd.date_approved <= p_summary_build_date
    AND    shd.is_new_yn             = 'Y'
    AND    shd.start_date  BETWEEN p_glpr_qtr_start_date
                               AND p_summary_build_date
    AND    (   shd.date_terminated IS NULL
            OR shd.date_terminated > p_summary_build_date)
    AND    shd.base_contract_amount
                 BETWEEN 0 AND oki_load_sgr_pvt.g_problem_k_threshold
    ;
Line: 195

    SELECT NVL(SUM(base_contract_amount), 0) base_contract_amount
         , NVL(SUM(sob_contract_amount), 0) sob_contract_amount
    FROM   oki_sales_k_hdrs shd
    WHERE  shd.ste_code      = 'CANCELLED'
    AND    shd.is_new_yn    IS NULL
    AND    shd.is_latest_yn IS NULL
    AND    shd.start_date BETWEEN p_glpr_qtr_start_date
                              AND p_summary_build_date
    AND    shd.base_contract_amount
                 BETWEEN 0 AND oki_load_sgr_pvt.g_problem_k_threshold
    ;
Line: 214

    SELECT  NVL(SUM((((shd.end_date - shd.date_terminated) /
            (shd.end_date - shd.start_date)) *
            base_contract_amount)), 0) base_contract_amount
          , NVL(SUM((((shd.end_date - shd.date_terminated) /
            (shd.end_date - shd.start_date)) *
            sob_contract_amount)), 0) sob_contract_amount
    FROM   oki_sales_k_hdrs shd
    WHERE  date_terminated BETWEEN p_glpr_qtr_start_date
                                      AND p_summary_build_date
    AND    shd.base_contract_amount
                 BETWEEN 0 AND oki_load_sgr_pvt.g_problem_k_threshold
    ;
Line: 261

    INSERT INTO oki_seq_growth_rate
    (        period_set_name
           , period_name
           , period_type
           , summary_build_date
           , authoring_org_id
           , authoring_org_name
           , customer_party_id
           , customer_name
           , seq_grw_rate_code
           , scs_code
           , product_category_code
           , curr_base_contract_amount
           , prev_base_contract_amount
           , curr_sob_contract_amount
           , prev_sob_contract_amount
           , request_id
           , program_application_id
           , program_id
           , program_update_date )
    VALUES ( p_period_set_name
           , p_period_name
           , p_period_type
           , p_summary_build_date
           , p_authoring_org_id
           , p_authoring_org_name
           , p_customer_party_id
           , p_customer_name
           , p_seq_grw_rate_code
           , p_scs_code
           , p_product_category_code
           , p_curr_base_contract_amount
           , p_prev_base_contract_amount
           , p_curr_sob_contract_amount
           , p_prev_sob_contract_amount
           , oki_load_sgr_pvt.g_request_id
           , oki_load_sgr_pvt.g_program_application_id
           , oki_load_sgr_pvt.g_program_id
           , oki_load_sgr_pvt.g_program_update_date ) ;
Line: 348

    UPDATE oki_seq_growth_rate SET
        curr_base_contract_amount = p_curr_base_contract_amount
      , prev_base_contract_amount = p_prev_base_contract_amount
      , curr_sob_contract_amount  = p_curr_sob_contract_amount
      , prev_sob_contract_amount  = p_prev_sob_contract_amount
      , request_id                = oki_load_sgr_pvt.g_request_id
      , program_application_id    = oki_load_sgr_pvt.g_program_application_id
      , program_id                = oki_load_sgr_pvt.g_program_id
      , program_update_date       = oki_load_sgr_pvt.g_program_update_date
    WHERE ROWID =  p_sgr_rowid ;
Line: 447

    SELECT NVL(SUM(base_contract_amount), 0) base_contract_amount
         , NVL(SUM(sob_contract_amount), 0) sob_contract_amount
    FROM   oki_sales_k_hdrs shd
    WHERE  shd.date_signed   <= p_summary_build_date
    AND    shd.date_approved <= p_summary_build_date
    AND    shd.start_date    <= p_summary_build_date
    AND    shd.end_date       > p_summary_build_date
    AND    (   shd.date_terminated IS NULL
            OR shd.date_terminated > p_summary_build_date)
    AND    shd.customer_party_id          = p_customer_party_id
    AND    shd.base_contract_amount
                 BETWEEN 0 AND oki_load_sgr_pvt.g_problem_k_threshold
    ;
Line: 471

    SELECT NVL(SUM(base_contract_amount), 0) base_contract_amount
         , NVL(SUM(sob_contract_amount), 0) sob_contract_amount
    FROM   oki_sales_k_hdrs shd
    WHERE  shd.date_signed   <= p_glpr_qtr_end_date
    AND    shd.date_approved <= p_glpr_qtr_end_date
    AND    shd.end_date BETWEEN p_glpr_qtr_start_date
                            AND p_glpr_qtr_end_date
    AND    (   shd.date_terminated IS NULL
            OR shd.date_terminated  > p_summary_build_date)
    AND    shd.customer_party_id    = p_customer_party_id
    AND    shd.base_contract_amount
                 BETWEEN 0 AND oki_load_sgr_pvt.g_problem_k_threshold
    ;
Line: 494

    SELECT NVL(SUM(base_contract_amount), 0) base_contract_amount
         , NVL(SUM(sob_contract_amount), 0) sob_contract_amount
    FROM   oki_sales_k_hdrs shd
    WHERE  shd.is_new_yn       IS NULL
    AND    shd.date_signed     IS NOT NULL
    AND    shd.date_approved   IS NOT NULL
    AND    shd.start_date BETWEEN p_glpr_qtr_start_date
                              AND p_summary_build_date
    AND    GREATEST(shd.date_signed, shd.date_approved)
              BETWEEN p_glpr_qtr_start_date
                  AND p_summary_build_date
    AND    shd.customer_party_id = p_customer_party_id
    AND    shd.base_contract_amount
                 BETWEEN 0 AND oki_load_sgr_pvt.g_problem_k_threshold
    ;
Line: 519

    SELECT NVL(SUM(base_contract_amount), 0) base_contract_amount
         , NVL(SUM(sob_contract_amount), 0) sob_contract_amount
    FROM   oki_sales_k_hdrs shd
    WHERE  shd.is_new_yn     IS NULL
    AND    shd.date_signed   IS NOT NULL
    AND    shd.date_approved IS NOT NULL
    AND    shd.start_date     < p_glpr_qtr_start_date
    AND    GREATEST(shd.date_signed, shd.date_approved)
              BETWEEN p_glpr_qtr_start_date
                  AND p_summary_build_date
    AND    shd.customer_party_id = p_customer_party_id
    AND    shd.base_contract_amount
                 BETWEEN 0 AND oki_load_sgr_pvt.g_problem_k_threshold
    ;
Line: 543

    SELECT NVL(SUM(base_contract_amount), 0) base_contract_amount
         , NVL(SUM(sob_contract_amount), 0) sob_contract_amount
    FROM   oki_sales_k_hdrs shd
    WHERE  shd.date_signed   <= p_summary_build_date
    AND    shd.date_approved <= p_summary_build_date
    AND    shd.is_new_yn      = 'Y'
    AND    shd.start_date BETWEEN p_glpr_qtr_start_date
                              AND p_summary_build_date
    AND    (   shd.date_terminated IS NULL
            OR shd.date_terminated  > p_summary_build_date)
    AND    shd.customer_party_id    = p_customer_party_id
    AND    shd.base_contract_amount
                 BETWEEN 0 AND oki_load_sgr_pvt.g_problem_k_threshold
    ;
Line: 566

    SELECT NVL(SUM(base_contract_amount), 0) base_contract_amount
         , NVL(SUM(sob_contract_amount), 0) sob_contract_amount
    FROM   oki_sales_k_hdrs shd
    WHERE  shd.ste_code     = 'CANCELLED'
    AND    shd.is_new_yn    IS NULL
    AND    shd.is_latest_yn IS NULL
    AND    shd.start_date BETWEEN p_glpr_qtr_start_date
                              AND p_summary_build_date
    AND    shd.customer_party_id = p_customer_party_id
    AND    shd.base_contract_amount
                 BETWEEN 0 AND oki_load_sgr_pvt.g_problem_k_threshold
    ;
Line: 587

    SELECT NVL(SUM((((shd.end_date - shd.date_terminated) /
            (shd.end_date - shd.start_date)) *
            base_contract_amount)), 0) base_contract_amount
         , NVL(SUM((((shd.end_date - shd.date_terminated) /
            (shd.end_date - shd.start_date)) *
            sob_contract_amount)), 0) sob_contract_amount
    FROM   oki_sales_k_hdrs shd
    WHERE  date_terminated BETWEEN p_glpr_qtr_start_date
                                      AND p_summary_build_date
    AND    shd.customer_party_id = p_customer_party_id
    AND    shd.base_contract_amount
                 BETWEEN 0 AND oki_load_sgr_pvt.g_problem_k_threshold
    ;
Line: 604

    SELECT   DISTINCT shd.customer_party_id customer_party_id
           , shd.customer_name customer_name
    FROM     oki_sales_k_hdrs shd
    ;
Line: 693

        l_loc := 'Opening cursor to determine if insert or update should occur.'  ;
Line: 703

            l_loc := 'Insert the new record.' ;
Line: 728

            l_loc := 'Update the existing record.' ;
Line: 783

        l_loc := 'Opening cursor to determine if insert or update should occur.'  ;
Line: 794

            l_loc := 'Insert the new record.' ;
Line: 819

            l_loc := 'Update the existing record.' ;
Line: 872

        l_loc := 'Opening cursor to determine if insert or update should occur.'  ;
Line: 882

            l_loc := 'Insert the new record.' ;
Line: 907

            l_loc := 'Update the existing record.' ;
Line: 960

        l_loc := 'Opening cursor to determine if insert or update should occur.'  ;
Line: 970

            l_loc := 'Insert the new record.' ;
Line: 995

            l_loc := 'Update the existing record.' ;
Line: 1046

        l_loc := 'Opening cursor to determine if insert or update should occur.'  ;
Line: 1056

            l_loc := 'Insert the new record.' ;
Line: 1081

            l_loc := 'Update the existing record.' ;
Line: 1132

        l_loc := 'Opening cursor to determine if insert or update should occur.'  ;
Line: 1142

            l_loc := 'Insert the new record.' ;
Line: 1167

            l_loc := 'Update the existing record.' ;
Line: 1224

        l_loc := 'Opening cursor to determine if insert or update should occur.'  ;
Line: 1234

            l_loc := 'Insert the new record.' ;
Line: 1259

            l_loc := 'Update the existing record.' ;
Line: 1283

        l_loc := 'Opening cursor to determine if insert or update should occur.'  ;
Line: 1293

            l_loc := 'Insert the new record.' ;
Line: 1318

            l_loc := 'Update the existing record.' ;
Line: 1370

        l_loc := 'Opening cursor to determine if insert or update should occur.'  ;
Line: 1380

            l_loc := 'Insert the new record.' ;
Line: 1405

            l_loc := 'Update the existing record.' ;
Line: 1529

    SELECT NVL(SUM(base_contract_amount), 0) base_contract_amount
         , NVL(SUM(sob_contract_amount), 0) sob_contract_amount
    FROM   oki_sales_k_hdrs shd
    WHERE  shd.date_signed   <= p_summary_build_date
    AND    shd.date_approved <= p_summary_build_date
    AND    shd.start_date    <= p_summary_build_date
    AND    shd.end_date       > p_summary_build_date
    AND    (   shd.date_terminated IS NULL
            OR shd.date_terminated  > p_summary_build_date)
    AND    shd.authoring_org_id     = p_authoring_org_id
    AND    shd.base_contract_amount
                 BETWEEN 0 AND oki_load_sgr_pvt.g_problem_k_threshold
    ;
Line: 1553

    SELECT NVL(SUM(base_contract_amount), 0) base_contract_amount
         , NVL(SUM(sob_contract_amount), 0) sob_contract_amount
    FROM   oki_sales_k_hdrs shd
    WHERE  shd.date_signed   <= p_glpr_qtr_end_date
    AND    shd.date_approved <= p_glpr_qtr_end_date
    AND    shd.end_date BETWEEN p_glpr_qtr_start_date
                            AND p_glpr_qtr_end_date
    AND    (   shd.date_terminated IS NULL
            OR shd.date_terminated  > p_summary_build_date)
    AND    shd.authoring_org_id     = p_authoring_org_id
    AND    shd.base_contract_amount
                 BETWEEN 0 AND oki_load_sgr_pvt.g_problem_k_threshold
    ;
Line: 1576

    SELECT NVL(SUM(base_contract_amount), 0) base_contract_amount
         , NVL(SUM(sob_contract_amount), 0) sob_contract_amount
    FROM   oki_sales_k_hdrs shd
    WHERE  shd.is_new_yn       IS NULL
    AND    shd.date_signed     IS NOT NULL
    AND    shd.date_approved   IS NOT NULL
    AND    shd.start_date BETWEEN p_glpr_qtr_start_date
                              AND p_summary_build_date
    AND    GREATEST(shd.date_signed, shd.date_approved)
              BETWEEN p_glpr_qtr_start_date
                  AND p_summary_build_date
    AND    shd.authoring_org_id = p_authoring_org_id
    AND    shd.base_contract_amount
                 BETWEEN 0 AND oki_load_sgr_pvt.g_problem_k_threshold
    ;
Line: 1601

    SELECT NVL(SUM(base_contract_amount), 0) base_contract_amount
         , NVL(SUM(sob_contract_amount), 0) sob_contract_amount
    FROM   oki_sales_k_hdrs shd
    WHERE  shd.is_new_yn     IS NULL
    AND    shd.date_signed   IS NOT NULL
    AND    shd.date_approved IS NOT NULL
    AND    shd.start_date     < p_glpr_qtr_start_date
    AND    GREATEST(shd.date_signed, shd.date_approved)
              BETWEEN p_glpr_qtr_start_date
                  AND p_summary_build_date
    AND    shd.authoring_org_id = p_authoring_org_id
    AND    shd.base_contract_amount
                 BETWEEN 0 AND oki_load_sgr_pvt.g_problem_k_threshold
    ;
Line: 1625

    SELECT NVL(SUM(base_contract_amount), 0) base_contract_amount
         , NVL(SUM(sob_contract_amount), 0) sob_contract_amount
    FROM   oki_sales_k_hdrs shd
    WHERE  shd.date_signed   <= p_summary_build_date
    AND    shd.date_approved <= p_summary_build_date
    AND    shd.is_new_yn      = 'Y'
    AND    shd.start_date BETWEEN p_glpr_qtr_start_date
                              AND p_summary_build_date
    AND    (   shd.date_terminated IS NULL
            OR shd.date_terminated  > p_summary_build_date)
    AND    shd.authoring_org_id     = p_authoring_org_id
    AND    shd.base_contract_amount
                 BETWEEN 0 AND oki_load_sgr_pvt.g_problem_k_threshold
    ;
Line: 1648

    SELECT NVL(SUM(base_contract_amount), 0) base_contract_amount
         , NVL(SUM(sob_contract_amount), 0) sob_contract_amount
    FROM   oki_sales_k_hdrs shd
    WHERE  shd.ste_code     = 'CANCELLED'
    AND    shd.is_new_yn    IS NULL
    AND    shd.is_latest_yn IS NULL
    AND    shd.start_date BETWEEN p_glpr_qtr_start_date
                              AND p_summary_build_date
    AND    shd.authoring_org_id = p_authoring_org_id
    AND    shd.base_contract_amount
                 BETWEEN 0 AND oki_load_sgr_pvt.g_problem_k_threshold
    ;
Line: 1669

    SELECT NVL(SUM((((shd.end_date - shd.date_terminated) /
            (shd.end_date - shd.start_date)) *
            base_contract_amount)), 0) base_contract_amount
         , NVL(SUM((((shd.end_date - shd.date_terminated) /
            (shd.end_date - shd.start_date)) *
            sob_contract_amount)), 0) sob_contract_amount
    FROM   oki_sales_k_hdrs shd
    WHERE  date_terminated BETWEEN p_glpr_qtr_start_date
                               AND p_summary_build_date
    AND    shd.authoring_org_id  = p_authoring_org_id
    AND    shd.base_contract_amount
                 BETWEEN 0 AND oki_load_sgr_pvt.g_problem_k_threshold
    ;
Line: 1686

    SELECT   DISTINCT shd.authoring_org_id authoring_org_id
           , shd.organization_name authoring_org_name
    FROM     oki_sales_k_hdrs shd
    ;
Line: 1774

        l_loc := 'Opening cursor to determine if insert or update should occur.'  ;
Line: 1784

            l_loc := 'Insert the new record.' ;
Line: 1809

            l_loc := 'Update the existing record.' ;
Line: 1864

        l_loc := 'Opening cursor to determine if insert or update should occur.'  ;
Line: 1874

            l_loc := 'Insert the new record.' ;
Line: 1899

            l_loc := 'Update the existing record.' ;
Line: 1951

        l_loc := 'Opening cursor to determine if insert or update should occur.'  ;
Line: 1961

            l_loc := 'Insert the new record.' ;
Line: 1986

            l_loc := 'Update the existing record.' ;
Line: 2038

        l_loc := 'Opening cursor to determine if insert or update should occur.'  ;
Line: 2048

            l_loc := 'Insert the new record.' ;
Line: 2073

            l_loc := 'Update the existing record.' ;
Line: 2123

        l_loc := 'Opening cursor to determine if insert or update should occur.'  ;
Line: 2133

            l_loc := 'Insert the new record.' ;
Line: 2158

            l_loc := 'Update the existing record.' ;
Line: 2208

      l_loc := 'Opening cursor to determine if insert or update should occur.'  ;
Line: 2218

          l_loc := 'Insert the new record.' ;
Line: 2243

            l_loc := 'Update the existing record.' ;
Line: 2299

        l_loc := 'Opening cursor to determine if insert or update should occur.'  ;
Line: 2309

            l_loc := 'Insert the new record.' ;
Line: 2334

            l_loc := 'Update the existing record.' ;
Line: 2357

        l_loc := 'Opening cursor to determine if insert or update should occur.'  ;
Line: 2367

            l_loc := 'Insert the new record.' ;
Line: 2392

            l_loc := 'Update the existing record.' ;
Line: 2446

        l_loc := 'Opening cursor to determine if insert or update should occur.'  ;
Line: 2456

            l_loc := 'Insert the new record.' ;
Line: 2481

            l_loc := 'Update the existing record.' ;
Line: 2720

        l_loc := 'Opening cursor to determine if insert or update should occur.'  ;
Line: 2730

            l_loc := 'Insert the new record.' ;
Line: 2755

            l_loc := 'Update the existing record.' ;
Line: 2808

        l_loc := 'Opening cursor to determine if insert or update should occur.'  ;
Line: 2818

            l_loc := 'Insert the new record.' ;
Line: 2843

            l_loc := 'Update the existing record.' ;
Line: 2896

        l_loc := 'Opening cursor to determine if insert or update should occur.'  ;
Line: 2906

            l_loc := 'Insert the new record.' ;
Line: 2931

            l_loc := 'Update the existing record.' ;
Line: 2984

        l_loc := 'Opening cursor to determine if insert or update should occur.'  ;
Line: 2994

            l_loc := 'Insert the new record.' ;
Line: 3019

            l_loc := 'Update the existing record.' ;
Line: 3070

        l_loc := 'Opening cursor to determine if insert or update should occur.'  ;
Line: 3080

            l_loc := 'Insert the new record.' ;
Line: 3105

            l_loc := 'Update the existing record.' ;
Line: 3156

        l_loc := 'Opening cursor to determine if insert or update should occur.'  ;
Line: 3166

            l_loc := 'Insert the new record.' ;
Line: 3191

            l_loc := 'Update the existing record.' ;
Line: 3248

        l_loc := 'Opening cursor to determine if insert or update should occur.'  ;
Line: 3258

            l_loc := 'Insert the new record.' ;
Line: 3283

            l_loc := 'Update the existing record.' ;
Line: 3307

        l_loc := 'Opening cursor to determine if insert or update should occur.'  ;
Line: 3317

            l_loc := 'Insert the new record.' ;
Line: 3342

            l_loc := 'Update the existing record.' ;
Line: 3396

        l_loc := 'Opening cursor to determine if insert or update should occur.'  ;
Line: 3406

            l_loc := 'Insert the new record.' ;
Line: 3431

            l_loc := 'Update the existing record.' ;
Line: 3553

    SELECT NVL(SUM(base_contract_amount), 0) base_contract_amount
         , NVL(SUM(sob_contract_amount), 0) sob_contract_amount
    FROM   oki_sales_k_hdrs shd
    WHERE  shd.date_signed   <= p_summary_build_date
    AND    shd.date_approved <= p_summary_build_date
    AND    shd.start_date    <= p_summary_build_date
    AND    shd.end_date       > p_summary_build_date
    AND    (   shd.date_terminated IS NULL
            OR shd.date_terminated  > p_summary_build_date)
    ;
Line: 3573

    SELECT NVL(SUM(base_contract_amount), 0) base_contract_amount
         , NVL(SUM(sob_contract_amount), 0) sob_contract_amount
    FROM   oki_sales_k_hdrs shd
    WHERE  shd.date_signed   <= p_glpr_qtr_end_date
    AND    shd.date_approved <= p_glpr_qtr_end_date
    AND    shd.end_date BETWEEN p_glpr_qtr_start_date
                            AND p_glpr_qtr_end_date
    AND    (   shd.date_terminated IS NULL
            OR shd.date_terminated  > p_summary_build_date)
    ;
Line: 3592

    SELECT NVL(SUM(base_contract_amount), 0) base_contract_amount
         , NVL(SUM(sob_contract_amount), 0) sob_contract_amount
    FROM   oki_sales_k_hdrs shd
    WHERE  shd.is_new_yn            IS NULL
    AND    shd.date_signed   IS NOT NULL
    AND    shd.date_approved IS NOT NULL
    AND    shd.start_date BETWEEN p_glpr_qtr_start_date
                                     AND p_summary_build_date
    AND    GREATEST(shd.date_signed, shd.date_approved)
              BETWEEN p_glpr_qtr_start_date
                  AND p_summary_build_date
    ;
Line: 3613

    SELECT NVL(SUM(base_contract_amount), 0) base_contract_amount
         , NVL(SUM(sob_contract_amount), 0) sob_contract_amount
    FROM   oki_sales_k_hdrs shd
    WHERE  shd.is_new_yn     IS NULL
    AND    shd.date_signed   IS NOT NULL
    AND    shd.date_approved IS NOT NULL
    AND    shd.start_date     < p_glpr_qtr_start_date
    AND    GREATEST(shd.date_signed, shd.date_approved)
              BETWEEN p_glpr_qtr_start_date
                  AND p_summary_build_date
    ;
Line: 3633

    SELECT NVL(SUM(base_contract_amount), 0) base_contract_amount
         , NVL(SUM(sob_contract_amount), 0) sob_contract_amount
    FROM   oki_sales_k_hdrs shd
    WHERE  shd.date_signed   <= p_summary_build_date
    AND    shd.date_approved <= p_summary_build_date
    AND    shd.is_new_yn      = 'Y'
    AND    shd.start_date  BETWEEN p_glpr_qtr_start_date
                               AND p_summary_build_date
    AND    (   shd.date_terminated IS NULL
            OR shd.date_terminated  > p_summary_build_date)
    ;
Line: 3652

    SELECT NVL(SUM(base_contract_amount), 0) base_contract_amount
         , NVL(SUM(sob_contract_amount), 0) sob_contract_amount
    FROM   oki_sales_k_hdrs shd
    WHERE  shd.ste_code     = 'CANCELLED'
    AND    shd.is_new_yn    IS NULL
    AND    shd.is_latest_yn IS NULL
    AND    shd.start_date BETWEEN p_glpr_qtr_start_date
                              AND p_summary_build_date
    ;
Line: 3669

    SELECT  (((shd.end_date - shd.date_terminated) /
            (shd.end_date - shd.start_date)) *
            base_contract_amount) base_contract_amount
          , (((shd.end_date - shd.date_terminated) /
            (shd.end_date - shd.start_date)) *
            sob_contract_amount) sob_contract_amount
    FROM   oki_sales_k_hdrs shd
    WHERE  date_terminated BETWEEN p_glpr_qtr_start_date
                               AND p_summary_build_date
    ;
Line: 3762

      l_loc := 'Opening cursor to determine if insert or update should occur.'  ;
Line: 3772

          l_loc := 'Insert the new record.' ;
Line: 3797

            l_loc := 'Update the existing record.' ;
Line: 3850

        l_loc := 'Opening cursor to determine if insert or update should occur.'  ;
Line: 3861

            l_loc := 'Insert the new record.' ;
Line: 3886

            l_loc := 'Update the existing record.' ;
Line: 3939

        l_loc := 'Opening cursor to determine if insert or update should occur.'  ;
Line: 3949

            l_loc := 'Insert the new record.' ;
Line: 3974

            l_loc := 'Update the existing record.' ;
Line: 4026

        l_loc := 'Opening cursor to determine if insert or update should occur.'  ;
Line: 4036

            l_loc := 'Insert the new record.' ;
Line: 4061

            l_loc := 'Update the existing record.' ;
Line: 4111

        l_loc := 'Opening cursor to determine if insert or update should occur.'  ;
Line: 4121

            l_loc := 'Insert the new record.' ;
Line: 4146

            l_loc := 'Update the existing record.' ;
Line: 4197

        l_loc := 'Opening cursor to determine if insert or update should occur.'  ;
Line: 4207

            l_loc := 'Insert the new record.' ;
Line: 4232

            l_loc := 'Update the existing record.' ;
Line: 4289

        l_loc := 'Opening cursor to determine if insert or update should occur.'  ;
Line: 4299

            l_loc := 'Insert the new record.' ;
Line: 4324

            l_loc := 'Update the existing record.' ;
Line: 4348

        l_loc := 'Opening cursor to determine if insert or update should occur.'  ;
Line: 4358

            l_loc := 'Insert the new record.' ;
Line: 4383

            l_loc := 'Update the existing record.' ;
Line: 4438

        l_loc := 'Opening cursor to determine if insert or update should occur.'  ;
Line: 4448

            l_loc := 'Insert the new record.' ;
Line: 4473

            l_loc := 'Update the existing record.' ;
Line: 4675

    oki_refresh_pvt.update_oki_refresh( l_table_name, l_retcode ) ;
Line: 4732

  g_program_update_date    :=  SYSDATE ;