The following lines contain the word 'select', 'insert', 'update' or 'delete':
g_exact_for_cleansed.DELETE;
select WR1.original_word as org_w , WR1.replacement_word as rep_w,
WR1.user_spec_cond_value, WR1.condition_id
from hz_word_replacements WR1, hz_word_lists WL1
where WL1.word_list_id = wr_list_id
and WL1.word_list_id = WR1.word_list_id
and WR1.original_word like starting_char and instr( in_str, WR1.original_word) = 1
and ( ( staging_context = 'Y' and WR1.delete_flag = 'N')
OR (nvl(staging_context,'N') = 'N' and WR1.staged_flag = 'Y')
)
and (WR1.replacement_word IS NULL OR WR1.replacement_word like replacement_range)
order by length(WR1.ORIGINAL_WORD) desc
)
LOOP
--dbms_output.put_line( 'In loop original word is ' || original_str );
SELECT replacement_word, condition_id, user_spec_cond_value
FROM HZ_WORD_REPLACEMENTS
WHERE WORD_LIST_ID = cp_wl_id
AND ORIGINAL_WORD = cp_orig_word
AND ((staging_context = 'Y' AND DELETE_FLAG = 'N')
OR (nvl(staging_context,'N') = 'N' AND STAGED_FLAG = 'Y')
)
AND (REPLACEMENT_WORD IS NULL OR REPLACEMENT_WORD like cp_replacement_range)
and condition_id is not null
order by condition_id desc ;
SELECT replacement_word, condition_id, user_spec_cond_value
FROM HZ_WORD_REPLACEMENTS
WHERE WORD_LIST_ID = cp_wl_id
AND ORIGINAL_WORD = cp_orig_word
AND ((staging_context = 'Y' AND DELETE_FLAG = 'N')
OR (nvl(staging_context,'N') = 'N' AND STAGED_FLAG = 'Y')
)
AND (REPLACEMENT_WORD IS NULL OR REPLACEMENT_WORD like cp_replacement_range)
and condition_id is not null
order by condition_id desc ;
SELECT word_list_id FROM HZ_WORD_LISTS
WHERE word_list_name = p_word_list_name ;
SELECT count(*) INTO l_is_wildchar
FROM HZ_DQM_STAGE_LOG
WHERE operation = 'STAGE_FOR_WILDCHAR_SEARCH' AND ROWNUM = 1 ;