The following lines contain the word 'select', 'insert', 'update' or 'delete':
select e.copy_entity_txn_id
, e.transaction_category_id
, e.txn_category_attribute_id
, e.context_business_group_id
, e.src_effective_date
, e.context -- application_id
, a.information_category
, replace(a.information1, '''','''''') information1
, replace(a.information2, '''','''''') information2
, replace(a.information3, '''','''''') information3
, replace(a.information4, '''','''''') information4
, replace(a.information5, '''','''''') information5
, replace(a.information6, '''','''''') information6
, replace(a.information7, '''','''''') information7
, replace(a.information8, '''','''''') information8
, replace(a.information9, '''','''''') information9
, replace(a.information10, '''','''''') information10
, replace(a.information11, '''','''''') information11
, replace(a.information12, '''','''''') information12
, replace(a.information13, '''','''''') information13
, replace(a.information14, '''','''''') information14
, replace(a.information15, '''','''''') information15
, replace(a.information16, '''','''''') information16
, replace(a.information17, '''','''''') information17
, replace(a.information18, '''','''''') information18
, replace(a.information19, '''','''''') information19
, replace(a.information20, '''','''''') information20
, replace(a.information21, '''','''''') information21
, replace(a.information22, '''','''''') information22
, replace(a.information23, '''','''''') information23
, replace(a.information24, '''','''''') information24
, replace(a.information25, '''','''''') information25
, replace(a.information26, '''','''''') information26
, replace(a.information27, '''','''''') information27
, replace(a.information28, '''','''''') information28
, replace(a.information29, '''','''''') information29
, replace(a.information30, '''','''''') information30
, t.from_clause
, t.where_clause
, c.master_table_route_id
from pqh_copy_entity_txns e
, pqh_copy_entity_attribs a
, pqh_transaction_categories c
, pqh_table_route t
where e.copy_entity_txn_id = a.copy_entity_txn_id
and a.row_type_cd = 'CRITERIA'
and c.transaction_category_id = e.transaction_category_id
and c.master_table_route_id = t.table_route_id
and e.copy_entity_txn_id = p_copy_entity_txn_id ;
select decode(upper(ddf_column_name)
,'INFORMATION1', decode(information1,null, column_name, ''''||information1 ||'''')
,'INFORMATION2', decode(information2,null, column_name, ''''||information2 ||'''')
,'INFORMATION3', decode(information3,null, column_name, ''''||information3 ||'''')
,'INFORMATION4', decode(information4,null, column_name, ''''||information4 ||'''')
,'INFORMATION5', decode(information5,null, column_name, ''''||information5 ||'''')
,'INFORMATION6', decode(information6,null, column_name, ''''||information6 ||'''')
,'INFORMATION7', decode(information7,null, column_name, ''''||information7 ||'''')
,'INFORMATION8', decode(information8,null, column_name, ''''||information8 ||'''')
,'INFORMATION9', decode(information9,null, column_name, ''''||information9 ||'''')
,'INFORMATION10',decode(information10,null,column_name, ''''||information10||'''')
,'INFORMATION11',decode(information11,null,column_name, ''''||information11||'''')
,'INFORMATION12',decode(information12,null,column_name, ''''||information12||'''')
,'INFORMATION13',decode(information13,null,column_name, ''''||information13||'''')
,'INFORMATION14',decode(information14,null,column_name, ''''||information14||'''')
,'INFORMATION15',decode(information15,null,column_name, ''''||information15||'''')
,'INFORMATION16',decode(information16,null,column_name, ''''||information16||'''')
,'INFORMATION17',decode(information17,null,column_name, ''''||information17||'''')
,'INFORMATION18',decode(information18,null,column_name, ''''||information18||'''')
,'INFORMATION19',decode(information19,null,column_name, ''''||information19||'''')
,'INFORMATION20',decode(information20,null,column_name, ''''||information20||'''')
,'INFORMATION21',decode(information21,null,column_name, ''''||information21||'''')
,'INFORMATION22',decode(information22,null,column_name, ''''||information22||'''')
,'INFORMATION23',decode(information23,null,column_name, ''''||information23||'''')
,'INFORMATION24',decode(information24,null,column_name, ''''||information24||'''')
,'INFORMATION25',decode(information25,null,column_name, ''''||information25||'''')
,'INFORMATION26',decode(information26,null,column_name, ''''||information26||'''')
,'INFORMATION27',decode(information27,null,column_name, ''''||information27||'''')
,'INFORMATION28',decode(information28,null,column_name, ''''||information28||'''')
,'INFORMATION29',decode(information29,null,column_name, ''''||information29||'''')
,'INFORMATION30',decode(information30,null,column_name, ''''||information30||'''')
, column_name) info
from dual where rownum < 2;
select upper(a.column_name ) column_name
, a.column_type
, pqh_generic.get_alias(a.column_name) alias
, decode(column_type,'D', 'fnd_date.date_to_canonical('|| substr(a.column_name,1,instr(a.column_name||' ', ' ',1)-1) ||')'||' '||pqh_generic.get_alias(column_name)
, column_name ) col_dt_name
, a.width
, upper(s.ddf_column_name ) ddf_column_name
, upper(s.ddf_value_column_name ) ddf_value_column_name
, c.value_set_id
, s.context -- application_id a
from pqh_special_attributes s
, pqh_txn_category_attributes c
, pqh_attributes a
where s.txn_category_attribute_id = c.txn_category_attribute_id
and c.attribute_id = a.attribute_id
and c.transaction_category_id = p_transaction_category_id
and s.attribute_type_cd = p_attribute_type_cd
and s.context = pqh_gen_form.g_gbl_context
and c.select_flag = 'Y'
and a.enable_flag = 'Y' ;
select session_id, effective_date
from fnd_sessions
where session_id = userenv('sessionid')
for update of effective_date;
insert into fnd_sessions (session_id, effective_date)
values ( userenv('sessionid'), nvl(rec.src_effective_date, trunc(sysdate)));
update fnd_sessions
set effective_date = nvl(rec.src_effective_date,trunc(sysdate))
where current of c_session;
l_sel := 'Select 1 pqh_$$_unique' ;
pqh_refresh_data.g_refresh_tab.delete;
execute immediate 'begin select count(*) into pqh_gen_form.g_count from '||rec.from_clause ||l_where ||';'||
delete from pqh_copy_entity_results
where copy_entity_txn_id = p_copy_entity_txn_id;
procedure update_source (p_copy_entity_result_id number
, p_count number
, p_object_version_number in out nocopy number ) is
begin
pqh_copy_entity_results_api.update_copy_entity_result
( p_validate => false
, p_copy_entity_result_id => p_copy_entity_result_id
, p_number_of_copies => p_count
, p_object_version_number => p_object_version_number
, p_effective_date => trunc(sysdate)
, p_long_attribute1 => null
) ;
end update_source;
select cet.txn_category_attribute_id
, cet.replacement_type_cd
, cet.start_with
, cet.increment_by
, cet.transaction_category_id
, tct.master_table_route_id
, cet.context context -- application_id
from pqh_copy_entity_txns cet
, pqh_transaction_categories tct
where copy_entity_txn_id = p_copy_entity_txn_id
and tct.transaction_category_id = cet.transaction_category_id;
select copy_entity_attrib_id
, information1
, information2
, information3
, information4
, information5
, information6
, information7
, information8
, information9
, information10
, information11
, information12
, information13
, information14
, information15
, information16
, information17
, information18
, information19
, information20
, information21
, information22
, information23
, information24
, information25
, information26
, information27
, information28
, information29
, information30
from pqh_copy_entity_attribs
where copy_entity_txn_id = p_copy_entity_txn_id
and row_type_cd = 'CHANGEABLE' ;
select copy_entity_attrib_id
, row_type_cd
, information_category
, information1
, information2
, information3
, information4
, information5
, information6
, information7
, information8
, information9
, information10
, information11
, information12
, information13
, information14
, information15
, information16
, information17
, information18
, information19
, information20
, information21
, information22
, information23
, information24
, information25
, information26
, information27
, information28
, information29
, information30
from pqh_copy_entity_attribs
where copy_entity_txn_id = p_copy_entity_txn_id
and information_category = p_flex;
select copy_entity_result_id
, number_of_copies copies
, information1
, information2
, information3
, information4
, information5
, information6
, information7
, information8
, information9
, information10
, information11
, information12
, information13
, information14
, information15
, information16
, information17
, information18
, information19
, information20
, information21
, information22
, information23
, information24
, information25
, information26
, information27
, information28
, information29
, information30
, information31
, information32
, information33
, information34
, information35
, information36
, information37
, information38
, information39
, information40
, information41
, information42
, information43
, information44
, information45
, information46
, information47
, information48
, information49
, information50
, information51
, information52
, information53
, information54
, information55
, information56
, information57
, information58
, information59
, information60
, information61
, information62
, information63
, information64
, information65
, information66
, information67
, information68
, information69
, information70
, information71
, information72
, information73
, information74
, information75
, information76
, information77
, information78
, information79
, information80
, information81
, information82
, information83
, information84
, information85
, information86
, information87
, information88
, information89
, information90,
information91 ,
information92 ,
information93 ,
information94 ,
information95 ,
information96 ,
information97 ,
information98 ,
information99 ,
information100 ,
information101 ,
information102 ,
information103 ,
information104 ,
information105 ,
information106 ,
information107 ,
information108 ,
information109 ,
information110 ,
information111 ,
information112 ,
information113 ,
information114 ,
information115 ,
information116 ,
information117 ,
information118 ,
information119 ,
information120 ,
information121 ,
information122 ,
information123 ,
information124 ,
information125 ,
information126 ,
information127 ,
information128 ,
information129 ,
information130 ,
information131 ,
information132 ,
information133 ,
information134 ,
information135 ,
information136 ,
information137 ,
information138 ,
information139 ,
information140 ,
information141 ,
information142 ,
information143 ,
information144 ,
information145 ,
information146 ,
information147 ,
information148 ,
information149 ,
information150 ,
information151 ,
information152 ,
information153 ,
information154 ,
information155 ,
information156 ,
information157 ,
information158 ,
information159 ,
information160 ,
information161 ,
information162 ,
information163 ,
information164 ,
information165 ,
information166 ,
information167 ,
information168 ,
information169 ,
information170 ,
information171 ,
information172 ,
information173 ,
information174 ,
information175 ,
information176 ,
information177 ,
information178 ,
information179 ,
information180
, object_version_number
from pqh_copy_entity_results
where copy_entity_txn_id = p_copy_entity_txn_id
and number_of_copies <> 0
and result_type_cd = 'SOURCE'
for update of copy_entity_result_id;
select upper(pqh_generic.get_alias(att.column_name)) column_alias,
upper(sat.ddf_column_name) ddf_column_name,
upper(sat1.ddf_column_name) changeable_column_name,
sat.context context, -- application_id
sat1.context context_s1 -- application_id
from pqh_special_attributes sat,
pqh_txn_category_attributes tca,
pqh_transaction_categories tct,
pqh_attributes att,
pqh_special_attributes sat1
where sat.txn_category_attribute_id = tca.txn_category_attribute_id
and tca.attribute_id = att.attribute_id
and tct.master_table_route_id = v_table_route_id
and tct.transaction_category_id = tca.transaction_category_id
and sat.txn_category_attribute_id = sat1.txn_category_attribute_id
and sat.context = sat1.context
and sat.context = pqh_gen_form.g_gbl_context
and tca.select_flag = 'Y'
and att.enable_flag = 'Y'
and sat.attribute_type_cd in ('DISPLAY')
and sat1.attribute_type_cd = 'CHANGEABLE'
and sat.txn_category_attribute_id not in
(select txn_category_attribute_id from pqh_special_attributes
where context = pqh_gen_form.g_gbl_context
and attribute_type_cd = 'KEY_FLEX');
select upper(s.ddf_column_name ) ddf_column_name
, upper(s.ddf_value_column_name ) ddf_value_column_name
, c.value_set_id
, s.context context -- application_id
from pqh_special_attributes s
, pqh_txn_category_attributes c
where s.txn_category_attribute_id = c.txn_category_attribute_id
and c.transaction_category_id = p_transaction_category_id
and s.ddf_column_name <> 'INFORMATION1'
and s.attribute_type_cd = 'DISPLAY'
and s.context = pqh_gen_form.g_gbl_context
and c.value_set_id is not null
and s.ddf_value_column_name is not null ;
select sat.ddf_column_name ddf_column_name,
to_number(substr(column_name,instr(upper(column_name),'SEGMENT')+7,2)) nos
from pqh_special_attributes sat,
pqh_txn_category_attributes tca,
pqh_attributes att
where sat.txn_category_attribute_id = tca.txn_category_attribute_id
and tca.attribute_id = att.attribute_id
and tca.select_flag = 'Y'
and att.enable_flag = 'Y'
and sat.attribute_type_cd = 'SEGMENT'
and sat.flex_code = p_flex
and sat.context = pqh_gen_form.g_gbl_context
order by to_number(substr(column_name,instr(column_name,'SEGMENT')+7,2)) ;
select upper(st.ddf_column_name) ddf_column_name
, nvl(upper(st.ddf_value_column_name), upper(st.ddf_column_name)) col_name
, tc.value_set_id
, upper(st.ddf_value_column_name) ddf_value_column_name
, st.attribute_type_cd, st.flex_code
, pqh_gen_form.get_segment(ata.column_name) segment
from pqh_special_attributes st,
pqh_txn_category_attributes tc,
pqh_attributes ata
where st.txn_category_attribute_id = tc.txn_category_attribute_id
and ata.attribute_id = tc.attribute_id
and st.attribute_type_cd in ('SEGMENT','DISPLAY')
and st.context = pqh_gen_form.g_gbl_context
and tc.select_flag = 'Y'
and ata.enable_flag = 'Y'
and st.txn_category_attribute_id in
(select sat.txn_category_attribute_id
from pqh_special_attributes sat
where sat.context = pqh_gen_form.g_gbl_context
and sat.attribute_type_cd = 'CHANGEABLE'
and sat.txn_category_attribute_id = p_txn_category_attribute_id ); -- special_attribute
select application_column_name, segment_num, seg_no, rownum from (
select application_column_name,
segment_num,
to_number(substr(application_column_name, instr(upper(application_column_name),'SEGMENT')+7)) seg_no
from fnd_id_flex_segments
where id_flex_code = v_id_fc
and id_flex_num = v_id_fn
and application_id = v_appl_id
and enabled_flag = 'Y'
and display_flag = 'Y'
order by segment_num);
select ddf_column_name from pqh_special_attributes
where flex_code = p_flex
and context = pqh_gen_form.g_gbl_context
and attribute_type_cd = 'KEY_FLEX' ;
select sat.ddf_column_name ddf_column_name,
substr(pqh_generic.get_alias(column_name)
,instr(upper(pqh_generic.get_alias(column_name)),'SEGMENT')+7) seg_no
from pqh_special_attributes sat,
pqh_txn_category_attributes tca,
pqh_attributes att
where sat.txn_category_attribute_id = tca.txn_category_attribute_id
and tca.attribute_id = att.attribute_id
and att.master_table_route_id = v_table_route_id
and tca.select_flag = 'Y'
and att.enable_flag = 'Y'
and sat.attribute_type_cd = 'SEGMENT'
and sat.flex_code = p_flex
and sat.context = pqh_gen_form.g_gbl_context
order by to_number(substr(pqh_generic.get_alias(column_name)
,instr(upper(pqh_generic.get_alias(column_name)),'SEGMENT')+7)) ;
select ddf_column_name
from pqh_special_attributes sat,
pqh_txn_category_attributes tca,
pqh_attributes att
where sat.txn_category_attribute_id = tca.txn_category_attribute_id
and tca.attribute_id = att.attribute_id
and tca.select_flag = 'Y'
and att.enable_flag = 'Y'
and sat.attribute_type_cd = 'KEY_FLEX'
and sat.flex_code = p_flex
and sat.context = pqh_gen_form.g_gbl_context ;
select application_column_name,
segment_num,
to_number(substr(application_column_name, instr(upper(application_column_name),'SEGMENT')+7)) seg_no
from fnd_id_flex_segments
where id_flex_code = v_id_fc
and id_flex_num = v_id_fn
and application_id = v_appl_id
and enabled_flag = 'Y'
and display_flag = 'Y'
order by segment_num;
select sat2.ddf_column_name ch_col, sat.ddf_column_name ac_col
from pqh_special_attributes sat,
pqh_special_attributes sat2,
pqh_txn_category_attributes tca,
pqh_attributes att
where sat.txn_category_attribute_id = tca.txn_category_attribute_id
and sat.txn_category_attribute_id = sat2.txn_category_attribute_id
and tca.attribute_id = att.attribute_id
and tca.select_flag = 'Y'
and att.enable_flag = 'Y'
and sat.attribute_type_cd = 'KEY_FLEX'
and sat2.attribute_type_cd = 'CHANGEABLE'
and sat.flex_code = p_flex
and sat2.context = pqh_gen_form.g_gbl_context
and sat.context = pqh_gen_form.g_gbl_context ;
delete from pqh_copy_entity_results
where result_type_cd = 'TARGET'
and copy_entity_txn_id = p_copy_entity_txn_id;
PQH_GEN_FORM.g_attrib_tab.delete; -- clear table
update pqh_copy_entity_results
set status = 'TGT_P'
where copy_entity_result_id = rec.copy_entity_result_id;
l_str := 'select '||l_v_r.table_info.id_column_name||','
||l_v_r.table_info.value_column_name
||' into pqh_gen_form.g_v_id, pqh_gen_form.g_v_value '
||' from '
||l_v_r.table_info.table_name||' '||l_whr;
l_str := 'select '||substr(l_v_r.table_info.id_column_name,1,instr(l_v_r.table_info.id_column_name||' ',' '))||','
||substr(l_v_r.table_info.value_column_name,1,instr(l_v_r.table_info.value_column_name||' ',' '))
||' from '
||l_v_r.table_info.table_name||' '||l_whr;
select distinct tr.table_route_id, tr.display_name
from pqh_table_route tr
, pqh_attributes_vl a
, pqh_txn_category_attributes c
, pqh_transaction_categories cat
where a.master_table_route_id = tr.table_route_id
and a.attribute_id = c.attribute_id
and tr.table_route_id <> cat.master_table_route_id
and cat.transaction_category_id = c.transaction_category_id
and c.select_flag = 'Y'
and a.enable_flag = 'Y'
and c.transaction_category_id = nvl(p_transaction_category_id,-99);
select null from pqh_copy_entity_prefs where copy_entity_txn_id = nvl(p_copy_entity_txn_id,-99);
,p_select_flag => 'Y'
,p_object_version_number => l_ovn
,p_effective_date => trunc(sysdate) );
select legislation_code from per_business_groups
where business_group_id = nvl(p_business_group_id, -99) ;
select context
,application_short_name
,legislation_code
,responsibility_key
from pqh_copy_entity_contexts
where transaction_short_name = p_transaction_short_name ;
select context
from pqh_copy_entity_contexts
where transaction_short_name = p_transaction_short_name -- +++ ENSURE index on txn_short_name +++
and nvl(upper(application_short_name), 'NULL') = 'NULL'
and nvl(upper(legislation_code) , 'NULL') = 'NULL'
and nvl(upper(responsibility_key) , 'NULL') = 'NULL';
select application_short_name
from fnd_application
where application_id = p_application_id ;
select responsibility_key
from fnd_responsibility
where responsibility_id = p_responsibility_id ;
select short_name, context
from pqh_copy_entity_txns cet,
pqh_transaction_categories tct
where cet.transaction_category_id = tct.transaction_category_id
and cet.copy_entity_txn_id = p_copy_entity_txn_id ;
select ce1.context
from pqh_copy_entity_contexts ce1, pqh_copy_entity_contexts ce2
where ce1.transaction_short_name = ce2.transaction_short_name
and ce2.context = v_context
and nvl(upper(ce1.application_short_name), 'NULL') = 'NULL'
and nvl(upper(ce1.legislation_code) , 'NULL') = 'NULL'
and nvl(upper(ce1.responsibility_key) , 'NULL') = 'NULL';
select transaction_category_id,
member_cd,
name
from pqh_transaction_categories_vl
where short_name = p_short_name
and business_group_id is null ;
select short_name,
member_cd,
name
from pqh_transaction_categories_vl
where transaction_category_id = p_transaction_category_id;
select transaction_category_id
from pqh_copy_entity_txns
where copy_entity_txn_id = p_transaction_id ;
select function_type_cd
from pqh_transaction_categories tct
,pqh_copy_entity_functions cef
where tct.master_table_route_id = cef.table_route_id
and cef.context = p_context
and tct.transaction_category_id = p_transaction_category_id ;
select meaning from hr_lookups
where lookup_type = 'PQH_GEN_LOV'
and lookup_code = nvl(p_code,'NULL');
procedure delete_source (p_validate in boolean
, p_copy_entity_result_id in number
, p_object_version_number in number
, p_effective_date in date)
is
l_ovn number := p_object_version_number;
select copy_entity_result_id, object_version_number
from pqh_copy_entity_results
where src_copy_entity_result_id = p_copy_entity_result_id ;
pqh_copy_entity_results_api.delete_copy_entity_result
(p_validate => FALSE
,p_copy_entity_result_id => i.copy_entity_result_id
,p_object_version_number => i.object_version_number
,p_effective_date => p_effective_date );
pqh_copy_entity_results_api.delete_copy_entity_result
(p_validate => p_validate
,p_copy_entity_result_id => p_copy_entity_result_id
,p_object_version_number => l_ovn
,p_effective_date => p_effective_date );
end delete_source;
procedure flip_selection (p_mode in varchar2,
p_copy_entity_txn_id in number ,
p_copy_entity_result_id in number default null ,
p_block in varchar2 default 'SOURCE',
p_select_value in varchar2 )
is
begin
--
if p_mode = 'INVERT' then
update pqh_copy_entity_results
set number_of_copies = decode(number_of_copies,0, nvl(p_select_value,1), 0)
where copy_entity_txn_id = p_copy_entity_txn_id
--and src_copy_entity_result_id = nvl(p_copy_entity_result_id, -99)
and nvl(src_copy_entity_result_id,-99) = nvl(p_copy_entity_result_id, nvl(src_copy_entity_result_id,-99))
and status not in ('COMPLETED', 'DPT_ERR')
and result_type_cd = p_block ;
update pqh_copy_entity_results
set number_of_copies = 0
where copy_entity_txn_id = p_copy_entity_txn_id
and nvl(src_copy_entity_result_id,-99) = nvl(p_copy_entity_result_id, nvl(src_copy_entity_result_id,-99))
and status not in ('COMPLETED', 'DPT_ERR')
and result_type_cd = p_block ;
update pqh_copy_entity_results
set number_of_copies = nvl(p_select_value,1)
where copy_entity_txn_id = p_copy_entity_txn_id
and nvl(src_copy_entity_result_id,-99) = nvl(p_copy_entity_result_id, nvl(src_copy_entity_result_id,-99))
and status not in ('COMPLETED', 'DPT_ERR')
and result_type_cd = p_block ;
end flip_selection;
select
'Y'
from fnd_compiled_id_flex_structs fcf,
fnd_id_flex_structures fs
where fcf.id_flex_code = p_id_flex_code
and fcf.id_flex_num = p_id_flex_num
and fs.id_flex_code = fcf.id_flex_code
and fs.id_flex_num = fcf.id_flex_num
and fs.dynamic_inserts_allowed_flag = 'Y';
select context_business_group_id
from pqh_copy_entity_txns
where copy_entity_txn_id = pqh_gen_form.g_txn_id;
select ddf_column_name, ddf_value_column_name
from Pqh_special_attributes s
,pqh_txn_category_attributes c
,pqh_attributes a
where a.attribute_id = c.attribute_id
and c.txn_category_attribute_id = s.txn_category_attribute_id
and a.enable_flag = 'Y'
and c.select_flag = 'Y'
and s.context = pqh_gen_form.g_gbl_context
and s.attribute_type_cd = p_type
and a.column_name like 'DATETRACK_MODE'
and s.ddf_column_name is not null;
execute immediate 'update pqh_copy_entity_results set '||i.ddf_value_column_name||' = '''||p_dt_desc
||''' where copy_entity_txn_id = '||to_char(pqh_gen_form.g_txn_id)
||' and result_type_cd = ''TARGET'''
||' and number_of_copies = 1 and status in (''TGT_P'',''TGT_ERR'')' ;
execute immediate 'update pqh_copy_entity_results set '||i.ddf_column_name||' = '''||p_dt_mode
||''' where copy_entity_txn_id = '||to_char(pqh_gen_form.g_txn_id)
||' and result_type_cd = ''TARGET'''
||' and number_of_copies = 1 and status in (''TGT_P'',''TGT_ERR'')' ;
for i in c_dt('SELECT') loop
if i.ddf_value_column_name is not null then
execute immediate 'update pqh_copy_entity_results set '||i.ddf_value_column_name||' = '''||p_dt_desc
||''' where copy_entity_txn_id = '||to_char(pqh_gen_form.g_txn_id)
||' and result_type_cd = ''TARGET'''
||' and number_of_copies = 1 and status in (''TGT_P'',''TGT_ERR'')' ;
execute immediate 'update pqh_copy_entity_results set '||i.ddf_column_name||' = '''||p_dt_mode
||''' where copy_entity_txn_id = '||to_char(pqh_gen_form.g_txn_id)
||' and result_type_cd = ''TARGET'''
||' and number_of_copies = 1 and status in (''TGT_P'',''TGT_ERR'')' ;
execute immediate 'update pqh_copy_entity_results set '||i.ddf_value_column_name||' = '''||p_dt_desc
||''' where copy_entity_txn_id = '||to_char(pqh_gen_form.g_txn_id)
||' and result_type_cd = ''TARGET'''
||' and number_of_copies = 1 and status in (''TGT_P'',''TGT_ERR'')' ;
execute immediate 'update pqh_copy_entity_results set '||i.ddf_column_name||' = '''||p_dt_mode
||''' where copy_entity_txn_id = '||to_char(pqh_gen_form.g_txn_id)
||' and result_type_cd = ''TARGET'''
||' and number_of_copies = 1 and status in (''TGT_P'',''TGT_ERR'')' ;
select validation_type
from fnd_flex_value_sets
where flex_value_set_id = p_valueset_id;