 			where
 				specimen_event.collecting_event_id=collecting_event.collecting_event_id and
 				collecting_event.locality_id=locality.locality_id and
-				upper(spec_locality) LIKE '%#ucase(escapeQuotes(any_geog))#%'
+				upper(spec_locality) LIKE '%#ucase(escapeQuotes(any_geog2))#%'
 		UNION
 			select
 				specimen_event.collection_object_id

			where
				specimen_event.collecting_event_id=collecting_event.collecting_event_id and
				collecting_event.locality_id=locality.locality_id and
				upper(S$GEOGRAPHY) LIKE '%#ucase(escapeQuotes(any_geog))#%'
		UNION
			select
				specimen_event.collection_object_id

			where
				specimen_event.collecting_event_id=collecting_event.collecting_event_id and
				collecting_event.locality_id=locality.locality_id and
				upper(LOCALITY_NAME) LIKE '%#ucase(escapeQuotes(any_geog2))#%'
		UNION
			select
				specimen_event.collection_object_id
