In MS Access, I need to select a single row with many data from different tables with this query:
select top 1 a.colname,b.colname,c.colname
from tba a, tbb b, tbc c
where a.colname = 'efg' or
b.colname ='efg' or
c.colname ='efg'
I will get data perfectly when 'efg' is matched with at least 1 from the 3 tables BUT if it does not match with any of them I will get MS Access frozen with wait cursor. I guessed it is looping for some reason. I only able to stop it with END TASK in Windows's task manager.
How is my query and can any expert explain or suggest different techniques to avoid this?
Thank you.