DBA Data[Home] [Help]

APPS.OKI_LOAD_RBS_PVT SQL Statements

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

Line: 53

    SELECT rowid
    FROM   oki_renew_by_statuses rbs
    WHERE  rbs.period_set_name  = p_period_set_name
    AND    rbs.period_name      = p_period_name
    AND    rbs.authoring_org_id = p_authoring_org_id
    AND    rbs.status_code      = p_status_code
    AND    rbs.scs_code         = p_scs_code
    ;
Line: 89

    SELECT oki_renew_by_statuses_s1.nextval seq
    FROM dual ;
Line: 107

    INSERT INTO oki_renew_by_statuses
    (        id
           , period_set_name
           , period_name
           , period_type
           , authoring_org_id
           , authoring_org_name
           , status_code
           , scs_code
           , base_amount
           , contract_count
           , request_id
           , program_application_id
           , program_id
           , program_update_date )
    VALUES ( l_sequence
           , p_period_set_name
           , p_period_name
           , p_period_type
           , p_authoring_org_id
           , p_authoring_org_name
           , p_status_code
           , p_scs_code
           , p_base_amount
           , p_contract_count
           , oki_load_rbs_pvt.g_request_id
           , oki_load_rbs_pvt.g_program_application_id
           , oki_load_rbs_pvt.g_program_id
           , oki_load_rbs_pvt.g_program_update_date ) ;
Line: 202

    UPDATE oki_renew_by_statuses SET
        base_amount             = p_base_amount
      , contract_count          = p_contract_count
      , request_id              = oki_load_rbs_pvt.g_request_id
      , program_application_id  = oki_load_rbs_pvt.g_program_application_id
      , program_id              = oki_load_rbs_pvt.g_program_id
      , program_update_date     = oki_load_rbs_pvt.g_program_update_date
    WHERE ROWID = p_rowid ;
Line: 281

    SELECT   DISTINCT shd.authoring_org_id authoring_org_id
           , /*11510 change*/ NULL authoring_org_name
           , shd.scs_code scs_code
    FROM     oki_sales_k_hdrs shd
    ;
Line: 295

    SELECT   COUNT(DISTINCT(shd.chr_id)) contract_count
    FROM /*11510 change removed oki_Expired_lines and added oki_cov_prd_lines */
             oki_cov_prd_lines cpl
           , oki_sales_k_hdrs shd
    WHERE    cpl.end_date         BETWEEN p_start_date AND p_end_date
    /*11510 change start*/
    AND      cpl.is_exp_not_renewed_yn='Y'
    /*11510 change end*/
    AND      cpl.chr_id           = shd.chr_id
    AND      shd.authoring_org_id = p_authoring_org_id
    AND      shd.scs_code         = p_scs_code
    ;
Line: 317

    SELECT NVL(SUM(cpl.base_price_negotiated), 0) base_price_negotiated
      /*11510 change removed oki_Expired_lines and added oki_cov_prd_lines */
    FROM     oki_cov_prd_lines cpl
           , oki_sales_k_hdrs shd
    WHERE  cpl.end_date       BETWEEN p_start_date AND p_end_date
   /*11510 change start*/
    AND    cpl.is_exp_not_renewed_yn='Y'
    /*11510 change end*/
    AND    cpl.chr_id           = shd.chr_id
    AND    shd.authoring_org_id = p_authoring_org_id
    AND    shd.scs_code         = p_scs_code
    ;
Line: 339

    SELECT   COUNT(*) contract_count
           , NVL(SUM(shd.base_contract_amount), 0) base_contract_amount
    FROM     oki_sales_k_hdrs shd
    WHERE    shd.ste_code         = 'ENTERED'
    AND      NVL(shd.close_date, shd.start_date)
                   BETWEEN p_start_date AND p_end_date
    AND      shd.is_new_yn IS NULL
    AND      shd.authoring_org_id = p_authoring_org_id
    AND      shd.scs_code         = p_scs_code
    ;
Line: 359

    SELECT   COUNT(*) contract_count
           , NVL(SUM(shd.base_contract_amount), 0) base_contract_amount
    FROM     oki_sales_k_hdrs shd
    WHERE    shd.ste_code         IN ('ACTIVE','SIGNED')
    AND      LEAST(NVL(shd.date_signed, shd.start_date), shd.start_date)
                   BETWEEN p_start_date AND p_end_date
    AND      shd.is_new_yn IS NULL
    AND      shd.authoring_org_id = p_authoring_org_id
    AND      shd.scs_code         = p_scs_code
    ;
Line: 379

    SELECT   COUNT(*) contract_count
           , NVL(SUM(base_forecast_amount), 0) base_contract_amount
    FROM     oki_sales_k_hdrs shd
    WHERE    shd.close_date       BETWEEN p_start_date AND p_end_date
    AND      shd.win_percent      IS NOT NULL
    AND      shd.close_date       IS NOT NULL
    AND      shd.is_new_yn        IS NULL
    AND      shd.authoring_org_id = p_authoring_org_id
    AND      shd.scs_code         = p_scs_code
    ;
Line: 438

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

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

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

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

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

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

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

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

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

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

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

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

    SELECT   DISTINCT shd.scs_code
    FROM     oki_sales_k_hdrs shd
    ;
Line: 753

    SELECT   COUNT(DISTINCT(shd.chr_id)) contract_count
/*11510 change removed oki_Expired_lines and added oki_cov_prd_lines */
    FROM     oki_cov_prd_lines cpl
           , oki_sales_k_hdrs shd
    WHERE    cpl.end_date  BETWEEN p_start_date AND p_end_date
/*11510 change start*/
    AND      cpl.is_exp_not_renewed_yn='Y'
/*11510 change end*/
    AND      cpl.chr_id    = shd.chr_id
    AND      shd.scs_code  = p_scs_code
    ;
Line: 774

    SELECT NVL(SUM(cpl.base_price_negotiated), 0) base_price_negotiated
 /*11510 change removed oki_Expired_lines and added oki_cov_prd_lines */
       FROM  oki_cov_prd_lines cpl
           , oki_sales_k_hdrs shd
    WHERE    cpl.end_date BETWEEN p_start_date AND p_end_date
 /*11510 change start*/
    AND      cpl.is_exp_not_renewed_yn='Y'
/*11510 change end*/
    AND      cpl.chr_id     = shd.chr_id
    AND      shd.scs_code = p_scs_code
    ;
Line: 794

    SELECT   COUNT(*) contract_count
           , NVL(SUM(shd.base_contract_amount), 0) base_contract_amount
    FROM     oki_sales_k_hdrs shd
    WHERE    shd.ste_code  = 'ENTERED'
    AND      NVL(shd.close_date, shd.start_date) BETWEEN p_start_date AND p_end_date
    AND      shd.is_new_yn IS NULL
    AND      shd.scs_code  = p_scs_code
    ;
Line: 811

    SELECT   COUNT(*) contract_count
           , NVL(SUM(shd.base_contract_amount), 0) base_contract_amount
    FROM     oki_sales_k_hdrs shd
    WHERE    shd.ste_code  IN ('ACTIVE','SIGNED')
    AND      LEAST(NVL(shd.date_signed, shd.start_date), shd.start_date)
                           BETWEEN p_start_date AND p_end_date
    AND      shd.is_new_yn IS NULL
    AND      shd.scs_code  = p_scs_code
    ;
Line: 829

    SELECT   COUNT(*) contract_count
           , NVL(SUM(base_forecast_amount), 0) base_contract_amount
    FROM     oki_sales_k_hdrs shd
    WHERE    shd.close_date  BETWEEN p_start_date AND p_end_date
    AND      shd.win_percent IS NOT NULL
    AND      shd.close_date  IS NOT NULL
    AND      shd.is_new_yn   IS NULL
    AND      shd.scs_code    = p_scs_code
    ;
Line: 887

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

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

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

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

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

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

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

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

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

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

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

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

    SELECT NVL(SUM(cpl.base_price_negotiated), 0) base_price_negotiated
 /*11510 change removed oki_Expired_lines and added oki_cov_prd_lines */
    FROM     oki_cov_prd_lines cpl
    WHERE    cpl.end_date between p_start_date AND p_end_date
/*11510 change*/
     AND      cpl.is_exp_not_renewed_yn='Y'   ;
Line: 1207

    SELECT   COUNT(DISTINCT(shd.chr_id)) contract_count
 /*11510 change removed oki_Expired_lines and added oki_cov_prd_lines */
    FROM     oki_cov_prd_lines cpl
           , oki_sales_k_hdrs shd
    WHERE    cpl.end_date BETWEEN p_start_date and p_end_date
/*11510 change*/
    AND      cpl.is_exp_not_renewed_yn='Y'
    AND      cpl.chr_id   = shd.chr_id     ;
Line: 1223

    SELECT   COUNT(*) contract_count
           , NVL(SUM(shd.base_contract_amount), 0) base_contract_amount
    FROM     oki_sales_k_hdrs shd
    WHERE    shd.ste_code = 'ENTERED'
    AND      NVL(shd.close_date, shd.start_date)
                           BETWEEN p_start_date AND p_end_date
    AND      shd.is_new_yn IS NULL
    ;
Line: 1238

    SELECT     count(*) contract_count
             , NVL(SUM(shd.base_contract_amount), 0) base_contract_amount
    FROM     oki_sales_k_hdrs shd
    WHERE    shd.ste_code  IN ('ACTIVE','SIGNED')
    AND      LEAST(NVL(shd.date_signed, shd.start_date), shd.start_date)
                           BETWEEN p_start_date AND p_end_date
    AND      shd.is_new_yn IS NULL
    ;
Line: 1252

    SELECT   count(*) contract_count
           , NVL(SUM(base_forecast_amount), 0) base_contract_amount
    FROM     oki_sales_k_hdrs shd
    WHERE    shd.close_date  BETWEEN p_start_date AND p_end_date
    AND      shd.win_percent IS NOT NULL
    AND      shd.close_date  IS NOT NULL
    AND      shd.is_new_yn   IS NULL
    ;
Line: 1299

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

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

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

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

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

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

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

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

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

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

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

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

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

  g_program_update_date    :=  SYSDATE ;