The following lines contain the word 'select', 'insert', 'update' or 'delete':
SELECT 'TRUE'
INTO l_from_tax_usage_exists
FROM hz_geo_struct_map map, hz_locations loc, hz_address_usages usage
WHERE map.country_code = loc.country
AND map.loc_tbl_name = 'HZ_LOCATIONS'
AND nvl(map.address_style,'1') = nvl(loc.address_style,'1')
AND map.map_id = usage.map_id
AND usage.usage_code = 'TAX'
AND loc.location_id = p_from_location_id;
SELECT 'TRUE'
INTO l_to_tax_usage_exists
FROM hz_geo_struct_map map, hz_locations loc, hz_address_usages usage
WHERE map.country_code = loc.country
AND map.loc_tbl_name = 'HZ_LOCATIONS'
AND nvl(map.address_style,'1') = nvl(loc.address_style,'1')
AND map.map_id = usage.map_id
AND usage.usage_code = 'TAX'
AND loc.location_id = p_to_location_id;
SELECT gnr.geography_id, gnr.geography_type
BULK COLLECT INTO l_from_geography_id_tbl, l_from_geography_type_tbl
FROM hz_geo_name_references gnr,
hz_geo_name_reference_log log,
hz_geo_struct_map map,
hz_locations loc,
hz_address_usages usage,
hz_address_usage_dtls dtl
WHERE gnr.location_id = p_from_location_id
AND gnr.location_id = log.location_id
AND log.map_status = 'S'
AND log.usage_code = 'TAX'
AND loc.location_id = gnr.location_id
AND map.country_code = loc.country
AND map.loc_tbl_name = 'HZ_LOCATIONS'
AND nvl(map.address_style,'1') = nvl(loc.address_style,'1')
AND map.map_id = usage.map_id
AND usage.usage_code = 'TAX'
AND dtl.usage_id = usage.usage_id
AND dtl.geography_type = gnr.geography_type
ORDER BY gnr.geography_id;
SELECT gnr.geography_id, gnr.geography_type
BULK COLLECT INTO l_to_geography_id_tbl, l_to_geography_type_tbl
FROM hz_geo_name_references gnr,
hz_geo_name_reference_log log,
hz_geo_struct_map map,
hz_locations loc,
hz_address_usages usage,
hz_address_usage_dtls dtl
WHERE gnr.location_id = p_to_location_id
AND gnr.location_id = log.location_id
AND log.map_status = 'S'
AND log.usage_code = 'TAX'
AND loc.location_id = gnr.location_id
AND map.country_code = loc.country
AND map.loc_tbl_name = 'HZ_LOCATIONS'
AND nvl(map.address_style,'1') = nvl(loc.address_style,'1')
AND map.map_id = usage.map_id
AND usage.usage_code = 'TAX'
AND dtl.usage_id = usage.usage_id
AND dtl.geography_type = gnr.geography_type
ORDER BY gnr.geography_id;
SELECT country
INTO l_from_country_code
FROM hz_locations loc
WHERE loc.location_id = p_from_location_id;
SELECT country
INTO l_to_country_code
FROM hz_locations loc
WHERE loc.location_id = p_to_location_id;