DBA Data[Home] [Help]

APPS.AS_INTEREST_CODES_PUB SQL Statements

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

Line: 62

  l_last_update_date        DATE;
Line: 63

  l_current_last_update_date        DATE;
Line: 64

  l_last_update_login       NUMBER;
Line: 65

  l_last_updated_by         NUMBER;
Line: 96

      SELECT 1
	  FROM as_interest_codes_vl
	 WHERE interest_code_id = p_parent_interest_code_id
           AND interest_code_id IS NOT NULL;
Line: 103

	SELECT 1
	  FROM as_interest_types_vl
	 WHERE interest_type_id = p_interest_type_id
           AND interest_type_id IS NOT NULL;
Line: 110

	SELECT 1
	  FROM as_interest_codes_vl
	 WHERE TRIM(NLS_UPPER(code)) = p_code  -- passing in trimmed value while opening.
	   AND interest_type_id = p_interest_type_id
	   AND parent_interest_code_id IS NULL ;
Line: 117

	SELECT 1
	  FROM as_interest_codes_vl
	 WHERE TRIM(NLS_UPPER(code)) = p_code  -- passing in trimmed value while opening.
	   AND interest_type_id = p_interest_type_id
	   AND parent_interest_code_id = p_parent_interest_code_id ;
Line: 124

	 SELECT as_interest_codes_s.NEXTVAL
	   FROM DUAL;
Line: 128

    SELECT 1 FROM ENI_PROD_DEN_HRCHY_PARENTS_V P
    WHERE P.CATEGORY_ID = p_prod_cat_id
    AND P.CATEGORY_SET_ID = p_prod_cat_set_id;
Line: 137

        FND_MSG_PUB.DELETE_MSG;
Line: 204

	  IF p_interest_code_rec.last_update_date  = FND_API.G_MISS_DATE
	  OR TRIM(p_interest_code_rec.last_update_date) IS NULL
	  THEN
		l_last_update_date := SYSDATE;
Line: 209

		l_last_update_date := p_interest_code_rec.last_update_date;
Line: 211

	  IF p_interest_code_rec.last_updated_by  = FND_API.G_MISS_NUM
	  OR TRIM(p_interest_code_rec.last_updated_by) IS NULL
	  THEN
		l_last_updated_by := FND_GLOBAL.user_id;
Line: 216

		l_last_updated_by := p_interest_code_rec.last_updated_by;
Line: 218

	  IF p_interest_code_rec.last_update_login  = FND_API.G_MISS_NUM
	  OR TRIM(p_interest_code_rec.last_update_login) IS NULL
	  THEN
		l_last_update_login := FND_GLOBAL.login_id;
Line: 223

		l_last_update_login := p_interest_code_rec.last_update_login;
Line: 229

	-- replace with NULL before insert. Else use the value passed for insert.
	-- Only optional fields needs to be checked for Insert and replace with
	-- NULL for required fields the DB will throw error.

	IF p_interest_code_rec.parent_interest_code_id = FND_API.G_MISS_NUM
	THEN
		 l_parent_interest_code_id := NULL;
Line: 491

	-- Get the sequence number before inserting.
     OPEN  as_int_code_nextval_cur;
Line: 522

	-- Insert a New Interest Code into table
	 as_interest_codes_pkg.insert_row(
				x_row_id,
				x_interest_code_id,
				p_interest_code_rec.interest_type_id,
				p_interest_code_rec.master_enabled_flag,
				l_parent_interest_code_id,
				l_category_id,
				l_category_set_id,
				l_attribute_category,
				l_attribute1,
				l_attribute2,
				l_attribute3,
				l_attribute4,
				l_attribute5,
				l_attribute6,
				l_attribute7,
				l_attribute8,
				l_attribute9,
				l_attribute10,
				l_attribute11,
				l_attribute12,
				l_attribute13,
				l_attribute14,
				l_attribute15,
				l_pf_item_id,
				l_pf_organization_id,
				l_price,
				l_currency_code,
				TRIM(l_code),
				l_description,
				l_creation_date,
				l_created_by,
				l_last_update_date,
				l_last_updated_by,
				l_last_update_login,
                l_prod_cat_set_id,
                l_prod_cat_id
				);
Line: 631

PROCEDURE update_interest_code(
p_api_version_number 	IN 	NUMBER,
p_init_msg_list		IN	VARCHAR2 ,
p_commit	        IN	VARCHAR2 ,
p_validation_level	IN	NUMBER   ,
x_return_status		OUT NOCOPY	VARCHAR2,
x_msg_count             OUT NOCOPY	NUMBER,
x_msg_data              OUT NOCOPY	VARCHAR2,
p_interest_code_rec	IN	interest_code_rec_type
) IS
-- Declare Local Variable and Cursors
l_api_version	          NUMBER := p_api_version_number;
Line: 645

l_api_name 	CONSTANT  VARCHAR2(30) := 'update_interest_code';
Line: 646

x_last_update_date        DATE;
Line: 647

x_last_update_login       NUMBER;
Line: 648

x_last_updated_by         NUMBER;
Line: 649

l_last_update_date        DATE;
Line: 650

l_current_last_update_date        DATE;
Line: 651

l_last_update_login       NUMBER;
Line: 652

l_last_updated_by         NUMBER;
Line: 715

CURSOR fetch_db_value_cur(p_interest_code_id IN NUMBER) IS SELECT
              master_enabled_flag,
              parent_interest_code_id,
              category_id,
              category_set_id,
              attribute_category,
              attribute1,
              attribute2,
              attribute3,
              attribute4,
              attribute5,
              attribute6,
              attribute7,
              attribute8,
              attribute9,
              attribute10,
              attribute11,
              attribute12,
              attribute13,
              attribute14,
              attribute15,
              pf_item_id,
              pf_organization_id,
              price,
              currency_code,
              code,
              description,
              last_update_date,
              last_updated_by,
              last_update_login,
              product_cat_set_id,
              product_category_id
       FROM  AS_INTEREST_CODES_vl
      WHERE  interest_code_id = p_interest_code_id;
Line: 751

       SELECT 1
         FROM AS_INTEREST_TYPES_B
        WHERE INTEREST_TYPE_ID = p_interest_type_id
          AND INTEREST_TYPE_ID IS NOT NULL;
Line: 757

       SELECT 1
         FROM AS_INTEREST_CODES_B
        WHERE INTEREST_CODE_ID = p_parent_interest_code_id
          AND INTEREST_CODE_ID IS NOT NULL;
Line: 763

	SELECT 1
	  FROM as_interest_codes_vl
	 WHERE interest_code_id <> p_interest_code_id
           AND TRIM(NLS_UPPER(code)) = p_code     ----  -- passing in trimmed value while opening.
	   AND interest_type_id = p_interest_type_id
	   AND parent_interest_code_id IS NULL ;
Line: 771

	SELECT 1
	  FROM as_interest_codes_vl
	 WHERE interest_code_id <> p_interest_code_id
           AND TRIM(NLS_UPPER(code)) = p_code  ----- -- passing in trimmed value while opening.
	   AND interest_type_id = p_interest_type_id
	   AND parent_interest_code_id = p_parent_interest_code_id ;
Line: 778

CURSOR  lock_row_for_update(p_interest_code_id in number) IS
      SELECT   last_update_date
        FROM   as_interest_codes_vl
       WHERE   interest_code_id = p_interest_code_id;
Line: 784

    SELECT 1 FROM ENI_PROD_DEN_HRCHY_PARENTS_V P
    WHERE P.CATEGORY_ID = p_prod_cat_id
    AND P.CATEGORY_SET_ID = p_prod_cat_set_id;
Line: 787

    l_module CONSTANT VARCHAR2(255) := 'as.plsql.intc.update_interest_code';
Line: 792

	SAVEPOINT update_interest_code_PUB;
Line: 794

        FND_MSG_PUB.DELETE_MSG;
Line: 878

				  l_last_update_date,
				  l_last_updated_by,
				  l_last_update_login,
				  l_prod_cat_set_id,
				  l_prod_cat_id;
Line: 895

	IF p_interest_code_rec.last_update_date  = FND_API.G_MISS_DATE
	OR TRIM(p_interest_code_rec.last_update_date) IS NULL
	THEN
	   x_last_update_date := SYSDATE;
Line: 900

	   x_last_update_date := p_interest_code_rec.last_update_date;
Line: 902

	IF p_interest_code_rec.last_updated_by  = FND_API.G_MISS_NUM
	OR TRIM(p_interest_code_rec.last_updated_by) IS NULL
	THEN
	   x_last_updated_by := FND_GLOBAL.user_id;
Line: 907

	   x_last_updated_by := p_interest_code_rec.last_updated_by;
Line: 909

	IF p_interest_code_rec.last_update_login  = FND_API.G_MISS_NUM
	OR TRIM(p_interest_code_rec.last_update_login) IS NULL
	THEN
	   x_last_update_login := FND_GLOBAL.login_id;
Line: 914

	   x_last_update_login := p_interest_code_rec.last_update_login;
Line: 1172

	--  Lock the row for update. Check to see if the fetched value is same still.
	-- If they are same then update the record else give a message that the row has been
	-- updated by others.

   OPEN   lock_row_for_update(TRIM(NLS_UPPER(p_interest_code_rec.interest_code_id)));
Line: 1177

   FETCH  lock_row_for_update INTO  l_current_last_update_date;
Line: 1178

   IF     lock_row_for_update%NOTFOUND
   THEN
          CLOSE  lock_row_for_update;
Line: 1184

   IF l_last_update_date <> l_current_last_update_date
   THEN
          fnd_message.set_name('AS', 'API_RECORD_CHANGED');
Line: 1193

	  as_interest_codes_pkg.update_row(
				p_interest_code_rec.interest_code_id,
				p_interest_code_rec.interest_type_id,
				x_master_enabled_flag,
				x_parent_interest_code_id,
				x_category_id,
				x_category_set_id,
				x_attribute_category,
				x_attribute1,
				x_attribute2,
				x_attribute3,
				x_attribute4,
				x_attribute5,
				x_attribute6,
				x_attribute7,
				x_attribute8,
				x_attribute9,
				x_attribute10,
				x_attribute11,
				x_attribute12,
				x_attribute13,
				x_attribute14,
				x_attribute15,
				x_pf_item_id,
				x_pf_organization_id,
				x_price,
				x_currency_code,
				x_code,
				x_description,
				x_last_update_date,
				x_last_updated_by,
				x_last_update_login,
				x_prod_cat_set_id,
				x_prod_cat_id
				);
Line: 1230

      CLOSE  lock_row_for_update ;
Line: 1277

 END update_interest_code;