143: -- done for this location
144: -- Bug 6842648 Perf fix to query
145: SELECT count(1)
146: INTO l_gnr_count
147: FROM hz_geo_name_references
148: WHERE location_table_name = p_location_table_name
149: AND location_id = p_location_id
150: AND rownum = 1;
151:
175: IF l_ref_geo_type = 'COUNTRY' THEN
176: l_country_found := 'Y';
177: END IF;
178:
179: -- find the geography id from hz_geo_name_references
180: BEGIN
181: SELECT geography_id
182: INTO l_geography_id
183: FROM hz_geo_name_references
179: -- find the geography id from hz_geo_name_references
180: BEGIN
181: SELECT geography_id
182: INTO l_geography_id
183: FROM hz_geo_name_references
184: WHERE location_table_name = p_location_table_name
185: AND location_id = p_location_id
186: AND geography_type = l_ref_geo_type;
187: