DBA Data[Home] [Help]

APPS.OKL_QQH_PVT SQL Statements

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

Line: 11

    DELETE FROM OKL_QUICK_QUOTES_TL T
    WHERE NOT EXISTS (SELECT NULL FROM OKL_QUICK_QUOTES_ALL_B B WHERE B.ID =T.ID);
Line: 14

    UPDATE OKL_QUICK_QUOTES_TL T
    SET (SHORT_DESCRIPTION,
        DESCRIPTION,
        COMMENTS) =
                     (SELECT
                      B.SHORT_DESCRIPTION,
                      B.DESCRIPTION,
                      B.COMMENTS
                      FROM
                      OKL_QUICK_QUOTES_TL B
                      WHERE
                      B.ID = T.ID
                      AND B.LANGUAGE = T.SOURCE_LANG)
    WHERE (T.ID, T.LANGUAGE) IN (SELECT
                                 SUBT.ID,
                                 SUBT.LANGUAGE
                                 FROM
                                 OKL_QUICK_QUOTES_TL SUBB,
                                 OKL_QUICK_QUOTES_TL SUBT
                                 WHERE
                                 SUBB.ID = SUBT.ID
                                 AND SUBB.LANGUAGE = SUBT.SOURCE_LANG
                                 AND (SUBB.SHORT_DESCRIPTION <> SUBT.SHORT_DESCRIPTION
                                      OR (SUBB.DESCRIPTION <> SUBT.DESCRIPTION)
                                      OR (SUBB.COMMENTS <> SUBT.COMMENTS)
                                      OR (SUBB.SHORT_DESCRIPTION IS NULL AND SUBT.SHORT_DESCRIPTION IS NOT NULL)
                                      OR (SUBB.DESCRIPTION IS NULL AND SUBT.DESCRIPTION IS NOT NULL)
                                      OR (SUBB.COMMENTS IS NULL AND SUBT.COMMENTS IS NOT NULL)
                                     )
                                );
Line: 45

    INSERT INTO OKL_QUICK_QUOTES_TL (
        ID,
        LANGUAGE,
        SOURCE_LANG,
        SFWT_FLAG,
        CREATED_BY,
        CREATION_DATE,
        LAST_UPDATED_BY,
        LAST_UPDATE_DATE,
        LAST_UPDATE_LOGIN,
        SHORT_DESCRIPTION,
        DESCRIPTION,
        COMMENTS)
      SELECT
            B.ID,
            L.LANGUAGE_CODE,
            B.SOURCE_LANG,
            B.SFWT_FLAG,
            B.CREATED_BY,
            B.CREATION_DATE,
            B.LAST_UPDATED_BY,
            B.LAST_UPDATE_DATE,
            B.LAST_UPDATE_LOGIN,
            B.SHORT_DESCRIPTION,
            B.DESCRIPTION,
            B.COMMENTS
        FROM OKL_QUICK_QUOTES_TL B, FND_LANGUAGES L
       WHERE L.INSTALLED_FLAG IN ('I', 'B')
         AND B.LANGUAGE = USERENV('LANG')
         AND NOT EXISTS (
                    SELECT NULL
                      FROM OKL_QUICK_QUOTES_TL T
                     WHERE T.ID = B.ID
                       AND T.LANGUAGE = L.LANGUAGE_CODE
                    );
Line: 260

    SELECT
      id
      ,object_version_number
      ,attribute_category
      ,attribute1
      ,attribute2
      ,attribute3
      ,attribute4
      ,attribute5
      ,attribute6
      ,attribute7
      ,attribute8
      ,attribute9
      ,attribute10
      ,attribute11
      ,attribute12
      ,attribute13
      ,attribute14
      ,attribute15
      ,reference_number
      ,expected_start_date
      ,org_id
      ,inv_org_id
      ,currency_code
      ,term
      ,end_of_term_option_id
      ,pricing_method
      ,lease_opportunity_id
      ,originating_vendor_id
      ,program_agreement_id
      ,sales_rep_id
      ,sales_territory_id
      ,structured_pricing
      ,line_level_pricing
      ,rate_template_id
      ,rate_card_id
      ,lease_rate_factor
      ,target_rate_type
      ,target_rate
      ,target_amount
      ,target_frequency
      ,target_arrears
      ,target_periods
      ,iir
      ,sub_iir
      ,booking_yield
      ,sub_booking_yield
      ,pirr
      ,sub_pirr
      ,airr
      ,sub_airr
      -- abhsaxen - added - start
      ,sts_code
      -- abhsaxen - added - end
    INTO
      l_qqhv_rec.id
      ,l_qqhv_rec.object_version_number
      ,l_qqhv_rec.attribute_category
      ,l_qqhv_rec.attribute1
      ,l_qqhv_rec.attribute2
      ,l_qqhv_rec.attribute3
      ,l_qqhv_rec.attribute4
      ,l_qqhv_rec.attribute5
      ,l_qqhv_rec.attribute6
      ,l_qqhv_rec.attribute7
      ,l_qqhv_rec.attribute8
      ,l_qqhv_rec.attribute9
      ,l_qqhv_rec.attribute10
      ,l_qqhv_rec.attribute11
      ,l_qqhv_rec.attribute12
      ,l_qqhv_rec.attribute13
      ,l_qqhv_rec.attribute14
      ,l_qqhv_rec.attribute15
      ,l_qqhv_rec.reference_number
      ,l_qqhv_rec.expected_start_date
      ,l_qqhv_rec.org_id
      ,l_qqhv_rec.inv_org_id
      ,l_qqhv_rec.currency_code
      ,l_qqhv_rec.term
      ,l_qqhv_rec.end_of_term_option_id
      ,l_qqhv_rec.pricing_method
      ,l_qqhv_rec.lease_opportunity_id
      ,l_qqhv_rec.originating_vendor_id
      ,l_qqhv_rec.program_agreement_id
      ,l_qqhv_rec.sales_rep_id
      ,l_qqhv_rec.sales_territory_id
      ,l_qqhv_rec.structured_pricing
      ,l_qqhv_rec.line_level_pricing
      ,l_qqhv_rec.rate_template_id
      ,l_qqhv_rec.rate_card_id
      ,l_qqhv_rec.lease_rate_factor
      ,l_qqhv_rec.target_rate_type
      ,l_qqhv_rec.target_rate
      ,l_qqhv_rec.target_amount
      ,l_qqhv_rec.target_frequency
      ,l_qqhv_rec.target_arrears
      ,l_qqhv_rec.target_periods
      ,l_qqhv_rec.iir
      ,l_qqhv_rec.sub_iir
      ,l_qqhv_rec.booking_yield
      ,l_qqhv_rec.sub_booking_yield
      ,l_qqhv_rec.pirr
      ,l_qqhv_rec.sub_pirr
      ,l_qqhv_rec.airr
      ,l_qqhv_rec.sub_airr
      -- abhsaxen - added - start
      ,l_qqhv_rec.sts_code
      -- abhsaxen - added - end
    FROM OKL_QUICK_QUOTES_V
    WHERE id = p_id;
Line: 485

 	       SELECT 'x'
 	       FROM okl_quick_quotes_b
 	       WHERE  reference_number = p_qqhv_rec_type.reference_number
 	       AND    id <> NVL(p_qqhv_rec_type.id, -9999);
Line: 497

 	     SELECT QCKQTE_SEQ_PREFIX_TXT
 	     FROM okl_system_params;
Line: 795

  PROCEDURE insert_row (x_return_status OUT NOCOPY VARCHAR2, p_qqh_rec IN qqh_rec_type) IS

    l_prog_name  VARCHAR2(61);
Line: 801

    l_prog_name := G_PKG_NAME||'.insert_row (B)';
Line: 803

    INSERT INTO okl_quick_quotes_b (
      id
      ,object_version_number
      ,attribute_category
      ,attribute1
      ,attribute2
      ,attribute3
      ,attribute4
      ,attribute5
      ,attribute6
      ,attribute7
      ,attribute8
      ,attribute9
      ,attribute10
      ,attribute11
      ,attribute12
      ,attribute13
      ,attribute14
      ,attribute15
      ,created_by
      ,creation_date
      ,last_updated_by
      ,last_update_date
      ,last_update_login
      ,reference_number
      ,expected_start_date
      ,org_id
      ,inv_org_id
      ,currency_code
      ,term
      ,end_of_term_option_id
      ,pricing_method
      ,lease_opportunity_id
      ,originating_vendor_id
      ,program_agreement_id
      ,sales_rep_id
      ,sales_territory_id
      ,structured_pricing
      ,line_level_pricing
      ,rate_template_id
      ,rate_card_id
      ,lease_rate_factor
      ,target_rate_type
      ,target_rate
      ,target_amount
      ,target_frequency
      ,target_arrears
      ,target_periods
      ,iir
      ,sub_iir
      ,booking_yield
      ,sub_booking_yield
      ,pirr
      ,sub_pirr
      ,airr
      ,sub_airr
      -- abhsaxen - added - start
      ,sts_code
      -- abhsaxen - added - end
      )
    VALUES
      (
       p_qqh_rec.id
      ,p_qqh_rec.object_version_number
      ,p_qqh_rec.attribute_category
      ,p_qqh_rec.attribute1
      ,p_qqh_rec.attribute2
      ,p_qqh_rec.attribute3
      ,p_qqh_rec.attribute4
      ,p_qqh_rec.attribute5
      ,p_qqh_rec.attribute6
      ,p_qqh_rec.attribute7
      ,p_qqh_rec.attribute8
      ,p_qqh_rec.attribute9
      ,p_qqh_rec.attribute10
      ,p_qqh_rec.attribute11
      ,p_qqh_rec.attribute12
      ,p_qqh_rec.attribute13
      ,p_qqh_rec.attribute14
      ,p_qqh_rec.attribute15
      ,G_USER_ID
      ,SYSDATE
      ,G_USER_ID
      ,SYSDATE
      ,G_LOGIN_ID
      ,p_qqh_rec.reference_number
      ,p_qqh_rec.expected_start_date
      ,p_qqh_rec.org_id
      ,p_qqh_rec.inv_org_id
      ,p_qqh_rec.currency_code
      ,p_qqh_rec.term
      ,p_qqh_rec.end_of_term_option_id
      ,p_qqh_rec.pricing_method
      ,p_qqh_rec.lease_opportunity_id
      ,p_qqh_rec.originating_vendor_id
      ,p_qqh_rec.program_agreement_id
      ,p_qqh_rec.sales_rep_id
      ,p_qqh_rec.sales_territory_id
      ,p_qqh_rec.structured_pricing
      ,p_qqh_rec.line_level_pricing
      ,p_qqh_rec.rate_template_id
      ,p_qqh_rec.rate_card_id
      ,p_qqh_rec.lease_rate_factor
      ,p_qqh_rec.target_rate_type
      ,p_qqh_rec.target_rate
      ,p_qqh_rec.target_amount
      ,p_qqh_rec.target_frequency
      ,p_qqh_rec.target_arrears
      ,p_qqh_rec.target_periods
      ,p_qqh_rec.iir
      ,p_qqh_rec.sub_iir
      ,p_qqh_rec.booking_yield
      ,p_qqh_rec.sub_booking_yield
      ,p_qqh_rec.pirr
      ,p_qqh_rec.sub_pirr
      ,p_qqh_rec.airr
      ,p_qqh_rec.sub_airr
      -- abhsaxen - added - start
      ,p_qqh_rec.sts_code
      -- abhsaxen - added - end

    );
Line: 943

  END insert_row;
Line: 949

  PROCEDURE insert_row (x_return_status OUT NOCOPY VARCHAR2, p_qqhtl_rec IN qqhtl_rec_type) IS

    CURSOR get_languages IS
      SELECT language_code
        FROM FND_LANGUAGES
       WHERE INSTALLED_FLAG IN ('I', 'B');
Line: 962

    l_prog_name := G_PKG_NAME||'.insert_row (TL)';
Line: 972

      INSERT INTO OKL_QUICK_QUOTES_TL (
        id
       ,language
       ,source_lang
       ,sfwt_flag
       ,created_by
       ,creation_date
       ,last_updated_by
       ,last_update_date
       ,last_update_login
       ,short_description
       ,description
       ,comments)
      VALUES (
        p_qqhtl_rec.id
       ,l_lang_rec.language_code
       ,USERENV('LANG')
       ,l_sfwt_flag
       ,G_USER_ID
       ,SYSDATE
       ,G_USER_ID
       ,SYSDATE
       ,G_LOGIN_ID
       ,p_qqhtl_rec.short_description
       ,p_qqhtl_rec.description
       ,p_qqhtl_rec.comments);
Line: 1018

  END insert_row;
Line: 1024

  PROCEDURE insert_row (
    x_return_status                OUT NOCOPY VARCHAR2,
    p_qqhv_rec                     IN qqhv_rec_type,
    x_qqhv_rec                     OUT NOCOPY qqhv_rec_type) IS

    l_return_status                VARCHAR2(1);
Line: 1039

    l_prog_name := G_PKG_NAME||'.insert_row (V)';
Line: 1043

    SELECT okl_qqh_seq.nextval INTO l_qqhv_rec.ID FROM DUAL;
Line: 1071

    insert_row (x_return_status => l_return_status, p_qqh_rec => l_qqh_rec);
Line: 1079

    insert_row (x_return_status => l_return_status, p_qqhtl_rec => l_qqhtl_rec);
Line: 1113

  END insert_row;
Line: 1119

  PROCEDURE insert_row(
    p_api_version                  IN NUMBER,
    p_init_msg_list                IN VARCHAR2,
    x_return_status                OUT NOCOPY VARCHAR2,
    x_msg_count                    OUT NOCOPY NUMBER,
    x_msg_data                     OUT NOCOPY VARCHAR2,
    p_qqhv_rec                     IN qqhv_rec_type,
    x_qqhv_rec                     OUT NOCOPY qqhv_rec_type) IS

    l_return_status              VARCHAR2(1);
Line: 1134

    l_prog_name := G_PKG_NAME||'.insert_row (REC)';
Line: 1140

    insert_row (x_return_status                => l_return_status,
                p_qqhv_rec                     => p_qqhv_rec,
                x_qqhv_rec                     => x_qqhv_rec);
Line: 1175

  END insert_row;
Line: 1181

  PROCEDURE insert_row(
    p_api_version                  IN NUMBER,
    p_init_msg_list                IN VARCHAR2,
    x_return_status                OUT NOCOPY VARCHAR2,
    x_msg_count                    OUT NOCOPY NUMBER,
    x_msg_data                     OUT NOCOPY VARCHAR2,
    p_qqhv_tbl                     IN qqhv_tbl_type,
    x_qqhv_tbl                     OUT NOCOPY qqhv_tbl_type) IS

    l_return_status              VARCHAR2(1);
Line: 1197

    l_prog_name := G_PKG_NAME||'.insert_row (TBL)';
Line: 1208

          insert_row (x_return_status                => l_return_status,
                      p_qqhv_rec                     => p_qqhv_tbl(i),
                      x_qqhv_rec                     => x_qqhv_tbl(i));
Line: 1256

  END insert_row;
Line: 1269

    SELECT OBJECT_VERSION_NUMBER
      FROM OKL_QUICK_QUOTES_B
     WHERE ID = p_qqh_rec.id
       AND OBJECT_VERSION_NUMBER = p_qqh_rec.object_version_number
    FOR UPDATE OF OBJECT_VERSION_NUMBER NOWAIT;
Line: 1276

    SELECT OBJECT_VERSION_NUMBER
      FROM OKL_QUICK_QUOTES_B
     WHERE ID = p_qqh_rec.id;
Line: 1364

  PROCEDURE update_row(x_return_status OUT NOCOPY VARCHAR2, p_qqh_rec IN qqh_rec_type) IS

    l_return_status           VARCHAR2(1);
Line: 1372

    l_prog_name := G_PKG_NAME||'.update_row (B)';
Line: 1382

    UPDATE okl_quick_quotes_b
    SET
      object_version_number = p_qqh_rec.object_version_number+1
      ,attribute_category = p_qqh_rec.attribute_category
      ,attribute1 = p_qqh_rec.attribute1
      ,attribute2 = p_qqh_rec.attribute2
      ,attribute3 = p_qqh_rec.attribute3
      ,attribute4 = p_qqh_rec.attribute4
      ,attribute5 = p_qqh_rec.attribute5
      ,attribute6 = p_qqh_rec.attribute6
      ,attribute7 = p_qqh_rec.attribute7
      ,attribute8 = p_qqh_rec.attribute8
      ,attribute9 = p_qqh_rec.attribute9
      ,attribute10 = p_qqh_rec.attribute10
      ,attribute11 = p_qqh_rec.attribute11
      ,attribute12 = p_qqh_rec.attribute12
      ,attribute13 = p_qqh_rec.attribute13
      ,attribute14 = p_qqh_rec.attribute14
      ,attribute15 = p_qqh_rec.attribute15
      ,reference_number = p_qqh_rec.reference_number
      ,expected_start_date = p_qqh_rec.expected_start_date
      ,org_id = p_qqh_rec.org_id
      ,inv_org_id = p_qqh_rec.inv_org_id
      ,currency_code = p_qqh_rec.currency_code
      ,term = p_qqh_rec.term
      ,end_of_term_option_id = p_qqh_rec.end_of_term_option_id
      ,pricing_method = p_qqh_rec.pricing_method
      ,lease_opportunity_id = p_qqh_rec.lease_opportunity_id
      ,originating_vendor_id = p_qqh_rec.originating_vendor_id
      ,program_agreement_id = p_qqh_rec.program_agreement_id
      ,sales_rep_id = p_qqh_rec.sales_rep_id
      ,sales_territory_id = p_qqh_rec.sales_territory_id
      ,structured_pricing = p_qqh_rec.structured_pricing
      ,line_level_pricing = p_qqh_rec.line_level_pricing
      ,rate_template_id = p_qqh_rec.rate_template_id
      ,rate_card_id = p_qqh_rec.rate_card_id
      ,lease_rate_factor = p_qqh_rec.lease_rate_factor
      ,target_rate_type = p_qqh_rec.target_rate_type
      ,target_rate = p_qqh_rec.target_rate
      ,target_amount = p_qqh_rec.target_amount
      ,target_frequency = p_qqh_rec.target_frequency
      ,target_arrears = p_qqh_rec.target_arrears
      ,target_periods = p_qqh_rec.target_periods
      ,iir = p_qqh_rec.iir
      ,sub_iir = p_qqh_rec.sub_iir
      ,booking_yield = p_qqh_rec.booking_yield
      ,sub_booking_yield = p_qqh_rec.sub_booking_yield
      ,pirr = p_qqh_rec.pirr
      ,sub_pirr = p_qqh_rec.sub_pirr
      ,airr = p_qqh_rec.airr
      ,sub_airr = p_qqh_rec.sub_airr
      -- abhsaxen - added - start
      ,sts_code  = p_qqh_rec.sts_code
      -- abhsaxen - added - end
    WHERE id = p_qqh_rec.id;
Line: 1460

  END update_row;
Line: 1466

  PROCEDURE update_row(x_return_status OUT NOCOPY VARCHAR2, p_qqhtl_rec IN qqhtl_rec_type) IS

    l_prog_name               VARCHAR2(61);
Line: 1472

    l_prog_name := G_PKG_NAME||'.update_row (TL)';
Line: 1474

    UPDATE OKL_QUICK_QUOTES_TL
    SET
      source_lang = USERENV('LANG')
      ,sfwt_flag = 'Y'
      ,last_updated_by = G_USER_ID
      ,last_update_date = SYSDATE
      ,last_update_login = G_LOGIN_ID
      ,short_description = p_qqhtl_rec.short_description
      ,description = p_qqhtl_rec.description
      ,comments = p_qqhtl_rec.comments
    WHERE ID = p_qqhtl_rec.id;
Line: 1486

    UPDATE OKL_QUICK_QUOTES_TL
    SET SFWT_FLAG = 'N'
    WHERE ID = p_qqhtl_rec.id
    AND SOURCE_LANG = LANGUAGE;
Line: 1508

  END update_row;
Line: 1514

  PROCEDURE update_row (
    x_return_status                OUT NOCOPY VARCHAR2,
    p_qqhv_rec                     IN qqhv_rec_type,
    x_qqhv_rec                     OUT NOCOPY qqhv_rec_type) IS

    l_prog_name                    VARCHAR2(61);
Line: 1892

    l_prog_name := G_PKG_NAME||'.update_row (V)';
Line: 1931

    update_row (x_return_status => l_return_status, p_qqh_rec => l_qqh_rec);
Line: 1939

    update_row (x_return_status => l_return_status, p_qqhtl_rec => l_qqhtl_rec);
Line: 1973

  END update_row;
Line: 1979

  PROCEDURE update_row(
    p_api_version                  IN NUMBER,
    p_init_msg_list                IN VARCHAR2,
    x_return_status                OUT NOCOPY VARCHAR2,
    x_msg_count                    OUT NOCOPY NUMBER,
    x_msg_data                     OUT NOCOPY VARCHAR2,
    p_qqhv_rec                     IN qqhv_rec_type,
    x_qqhv_rec                     OUT NOCOPY qqhv_rec_type) IS

    l_return_status              VARCHAR2(1);
Line: 1994

    l_prog_name := G_PKG_NAME||'.update_row (REC)';
Line: 2000

    update_row (x_return_status                => l_return_status,
                p_qqhv_rec                     => p_qqhv_rec,
                x_qqhv_rec                     => x_qqhv_rec);
Line: 2037

  END update_row;
Line: 2043

  PROCEDURE update_row(
    p_api_version                  IN NUMBER,
    p_init_msg_list                IN VARCHAR2,
    x_return_status                OUT NOCOPY VARCHAR2,
    x_msg_count                    OUT NOCOPY NUMBER,
    x_msg_data                     OUT NOCOPY VARCHAR2,
    p_qqhv_tbl                     IN qqhv_tbl_type,
    x_qqhv_tbl                     OUT NOCOPY qqhv_tbl_type) IS

    l_return_status              VARCHAR2(1);
Line: 2058

    l_prog_name := G_PKG_NAME||'.update_row (TBL)';
Line: 2073

          update_row (x_return_status                => l_return_status,
                      p_qqhv_rec                     => p_qqhv_tbl(i),
                      x_qqhv_rec                     => x_qqhv_tbl(i));
Line: 2121

  END update_row;
Line: 2127

  PROCEDURE delete_row(
    x_return_status                OUT NOCOPY VARCHAR2,
    p_id                           IN NUMBER) IS

    l_prog_name                  VARCHAR2(61);
Line: 2135

    l_prog_name := G_PKG_NAME||'.delete_row (V)';
Line: 2137

    DELETE FROM OKL_QUICK_QUOTES_B WHERE id = p_id;
Line: 2138

    DELETE FROM OKL_QUICK_QUOTES_TL WHERE id = p_id;
Line: 2157

  END delete_row;
Line: 2163

  PROCEDURE delete_row(
    p_api_version                  IN NUMBER,
    p_init_msg_list                IN VARCHAR2,
    x_return_status                OUT NOCOPY VARCHAR2,
    x_msg_count                    OUT NOCOPY NUMBER,
    x_msg_data                     OUT NOCOPY VARCHAR2,
    p_qqhv_rec                     IN qqhv_rec_type) IS

    l_return_status              VARCHAR2(1);
Line: 2177

    l_prog_name := G_PKG_NAME||'.delete_row (REC)';
Line: 2183

    delete_row (x_return_status                => l_return_status,
                p_id                           => p_qqhv_rec.id);
Line: 2217

  END delete_row;
Line: 2223

  PROCEDURE delete_row(
    p_api_version                  IN NUMBER,
    p_init_msg_list                IN VARCHAR2,
    x_return_status                OUT NOCOPY VARCHAR2,
    x_msg_count                    OUT NOCOPY NUMBER,
    x_msg_data                     OUT NOCOPY VARCHAR2,
    p_qqhv_tbl                     IN qqhv_tbl_type) IS

    l_return_status                VARCHAR2(1);
Line: 2238

    l_prog_name := G_PKG_NAME||'.delete_row (TBL)';
Line: 2252

          delete_row (x_return_status                => l_return_status,
                      p_id                           => p_qqhv_tbl(i).id);
Line: 2291

  END delete_row;