DBA Data[Home] [Help]

APPS.PQH_TEM_SHD SQL Statements

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

Line: 66

    select
		template_name,
        short_name,
	template_id,
	attribute_only_flag,
	enable_flag,
	create_flag,
	transaction_category_id,
	under_review_flag,
	object_version_number,
	freeze_status_cd,
        template_type_cd,
	legislation_code
    from	pqh_templates
    where	template_id = p_template_id;
Line: 148

    select 	template_name,
        short_name,
	template_id,
	attribute_only_flag,
	enable_flag,
	create_flag,
	transaction_category_id,
	under_review_flag,
	object_version_number,
	freeze_status_cd,
        template_type_cd,
	legislation_code
    from	pqh_templates
    where	template_id = p_template_id
    for	update nowait;
Line: 273

  ,p_last_update_date               in  varchar2
  ) is
--
--
l_data_migrator_mode varchar2(1);
Line: 302

  ,p_last_update_date               => p_last_update_date);
Line: 325

  ,p_last_update_date               in  varchar2
  ) is
--
   l_effective_date            date  := sysdate ;
Line: 338

 l_last_updated_by            pqh_templates.last_updated_by%TYPE;
Line: 340

 l_last_update_date           pqh_templates.last_update_date%TYPE;
Line: 341

 l_last_update_login          pqh_templates.last_update_login%TYPE;
Line: 344

  cursor c1 is select userenv('LANG') from dual ;
Line: 346

  Cursor c2 is select transaction_category_id
               from pqh_transaction_categories
               where short_name = p_tran_cat_short_name
               and business_group_id is null;
Line: 351

  Cursor c3 is select template_id
               from pqh_templates
               where short_name = p_short_name ;
Line: 356

  Cursor C_Sel1 is select pqh_templates_s.nextval from sys.dual;
Line: 379

    l_last_updated_by := -1;
Line: 382

    l_last_updated_by := 0;
Line: 385

  l_last_updated_by := fnd_load_util.owner_id(p_owner);
Line: 389

  l_last_update_date := sysdate;
Line: 391

  l_creation_date := nvl(to_date(p_last_update_date,'YYYY/MM/DD'),trunc(sysdate));
Line: 392

  l_last_update_date := nvl(to_date(p_last_update_date,'YYYY/MM/DD'),trunc(sysdate));
Line: 393

  l_last_update_login := 0;
Line: 401

    update pqh_templates
    set
       template_name                     = p_template_name,
       short_name                        = p_short_name,
       attribute_only_flag               = p_attribute_only_flag,
       enable_flag                       = p_enable_flag,
       create_flag                       = p_create_flag,
       transaction_category_id           = l_transaction_category_id,
       under_review_flag                 = p_under_review_flag,
       freeze_status_cd                  = p_freeze_status_cd,
       template_type_cd                  = p_template_type_cd,
       legislation_code                  = p_legislation_code,
       last_updated_by                   = l_last_updated_by,
       last_update_date                  = l_last_update_date,
       last_update_login                 = l_last_update_login
    where template_id = l_template_id;
Line: 422

    UPDATE pqh_templates_tl
    SET  template_name                  = p_template_name,
         last_updated_by                =  l_last_updated_by,
         last_update_date               =  l_last_update_date,
         last_update_login              =  l_last_update_login,
         source_lang                    = userenv('LANG')
      WHERE template_id                 =  l_template_id
        AND userenv('LANG') in (LANGUAGE, SOURCE_LANG);
Line: 435

      insert into pqh_templates_tl(
        template_id,
        template_name,
	language,
	source_lang,
        created_by,
        creation_date,
        last_updated_by,
        last_update_date ,
        last_update_login
       )
       Select
        l_template_id,
	p_template_name,
	l.language_code,
	l_language ,
        l_created_by,
        l_creation_date,
        l_last_updated_by,
        l_last_update_date,
        l_last_update_login
       from fnd_languages l
       where l.installed_flag in ('I','B')
       and not exists (select null
                  from pqh_templates_tl ttl
                  where ttl.template_id = l_template_id
                    and ttl.language    = l.language_code );
Line: 480

      insert into pqh_templates(
        template_name,
        template_id,
        attribute_only_flag,
        enable_flag,
        create_flag,
        transaction_category_id,
        under_review_flag,
        object_version_number,
        last_update_date,
        last_updated_by,
        last_update_login,
        created_by,
        creation_date,
        freeze_status_cd,
        template_type_cd,
        legislation_code,
        short_name
      )
     Values(
        p_template_name,
        l_template_id,
        p_attribute_only_flag,
        p_enable_flag,
        p_create_flag,
        l_transaction_category_id,
        p_under_review_flag,
        1,
        l_last_update_date,
        l_last_updated_by,
        l_last_update_login,
        l_created_by,
        l_creation_date,
        p_freeze_status_cd,
        p_template_type_cd,
        p_legislation_code,
        p_short_name
      );
Line: 520

      insert into pqh_templates_tl(
        template_id,
        template_name,
	language,
	source_lang,
        created_by,
        creation_date,
        last_updated_by,
        last_update_date ,
        last_update_login
       )
       Select
        l_template_id,
	p_template_name,
	l.language_code,
	l_language ,
        l_created_by,
        l_creation_date,
        l_last_updated_by,
        l_last_update_date,
        l_last_update_login
       from fnd_languages l
       where l.installed_flag in ('I','B')
       and not exists (select null
                  from pqh_templates_tl ttl
                  where ttl.template_id = l_template_id
                    and ttl.language    = l.language_code );
Line: 563

  delete from PQH_TEMPLATES_TL T
  where not exists
    (select NULL
    from PQH_TEMPLATES B
    where B.TEMPLATE_ID = T.TEMPLATE_ID
    );
Line: 570

  update PQH_TEMPLATES_TL T set (
      TEMPLATE_NAME
    ) = (select
      B.TEMPLATE_NAME
    from PQH_TEMPLATES_TL B
    where B.TEMPLATE_ID = T.TEMPLATE_ID
    and B.LANGUAGE = T.SOURCE_LANG)
  where (
      T.TEMPLATE_ID,
      T.LANGUAGE
  ) in (select
      SUBT.TEMPLATE_ID,
      SUBT.LANGUAGE
    from PQH_TEMPLATES_TL SUBB, PQH_TEMPLATES_TL SUBT
    where SUBB.TEMPLATE_ID = SUBT.TEMPLATE_ID
    and SUBB.LANGUAGE = SUBT.SOURCE_LANG
    and (SUBB.TEMPLATE_NAME <> SUBT.TEMPLATE_NAME
  ));
Line: 589

  insert into PQH_TEMPLATES_TL (
    TEMPLATE_ID,
    TEMPLATE_NAME,
    LAST_UPDATE_DATE,
    CREATION_DATE,
    CREATED_BY,
    LAST_UPDATE_LOGIN,
    LAST_UPDATED_BY,
    LANGUAGE,
    SOURCE_LANG
  ) select
    B.TEMPLATE_ID,
    B.TEMPLATE_NAME,
    B.LAST_UPDATE_DATE,
    B.CREATION_DATE,
    B.CREATED_BY,
    B.LAST_UPDATE_LOGIN,
    B.LAST_UPDATED_BY,
    L.LANGUAGE_CODE,
    B.SOURCE_LANG
  from PQH_TEMPLATES_TL B, FND_LANGUAGES L
  where L.INSTALLED_FLAG in ('I', 'B')
  and B.LANGUAGE = userenv('LANG')
  and not exists
    (select NULL
    from PQH_TEMPLATES_TL T
    where T.TEMPLATE_ID = B.TEMPLATE_ID
    and T.LANGUAGE = L.LANGUAGE_CODE);