The following lines contain the word 'select', 'insert', 'update' or 'delete':
g_package_body.delete(l_index);
select bcm.column_name ,
bcm.entity_result_column_name
from ben_dm_column_mappings bcm ,
ben_dm_hierarchies bdh ,
ben_dm_Tables bdt
where bcm.table_id = bdh.table_id
and bdh.hierarchy_type = 'H'
and (bcm.column_name = bdh.column_name or bcm.column_name = bdt.surrogate_pk_column_name)
and bdh.table_id = bdt.table_id
order by bcm.entity_result_column_name
;
l_cursor := l_cursor || 'Select ' ;
procedure generate_update_dml
is
l_locals varchar2(32767) := null;
select bdh.parent_table_name,
bdh.parent_id_column_name,
bdh.column_name,
bdt.table_name,
bdt.surrogate_pk_column_name
from ben_dm_hierarchies bdh ,
ben_dm_Tables bdt
where bdh.hierarchy_type = 'H'
and bdh.table_id = bdt.table_id
order by bdh.table_id,bdh.column_name
;
l_proc := g_package || 'generate_update_dml' ;
l_cursor := l_cursor ||indent(l_indent)||'hr_utility.set_location(''update : ' ||i.table_name||''''||' ,5) ; '||indent(l_indent);
l_cursor := l_cursor|| 'update '|| i.table_name || ' Set ' || i.column_name || ' = l_target_id ' || indent(l_indent+8)||
'where ' || i.column_name || ' = l_source_id and ' ||indent(l_indent+8)||
i.SURROGATE_PK_COLUMN_NAME ||' = l_new_pk_key ; ' ||indent(l_indent+3) ;
end generate_update_dml;
generate_update_dml ;