title: MS Access Two tables return records where value from Table 1 found in more than one column table 2
body: <p>I can't seem to figure out the below using MS Access. </p>
  
  <p>Summary is that I have Two tables. I would like to compare column E in table to column A, B, or C and return the records on table1 where the values match. Basically the criteria to match (table2.column E) can be in more than one the columns in table1. </p>
  
  <p>Ex. 
  Table1</p>
  
  <p>Column A | Column B | Column C</p>
  
  <p>Dan   Stan        XXX</p>
  
  <p>David       XXX         XXX</p>
  
  <p>Roger       XXX         XXX </p>
  
  <p>Ricco       XXX         XXX</p>
  
  <p>Wilbert     XXX        Dingo</p>
  
  <p>Table2</p>
  
  <p>Column D | Column E | Column F</p>
  
  <p>1          Roger      North  </p>
  
  <p>2          Stan       South</p>
  
  <p>3          Michael    South</p>
  
  <p>4          Colo       East</p>
  
  <p>5          Kanye      East</p>
  
  <p>6          Dingo      West</p>
  
  <p>Return</p>
  
  <p>Column A | Column B | Column C | Column F</p>
  
  <p>Dan         Stan        XXX       South</p>
  
  <p>Roger       XXX         XXX       North</p>
  
  <p>Wilbert     XXX        Dingo      West</p>
  
  <p>I have tired below below SQL string in MS Access (2013)</p>
  
  <p>SELECT table1.*
  FROM table2 INNER JOIN table1 ON table2.column E = table1.[column A] 
  OR table2.column E = table1.[column B] OR table2.column E = table1.[column C];</p>
  
  <p>I don't get an error but something is seriously wrong - queries on this DB usually take 20-40 seconds (tops) (3 million records - linked tables to MS SQL Server 2016) - the query has been going for 40 minutes. When I view the table view in MS Access itself it shows the records but the application keeps freezing and stuttering. I tried going to end of the records and I had to kill MS Access. Tried pulling the data into a Pivot in Excel and I have never seen the data pull so slowly (we are talking 50 records a minute). </p>
  
  <p>Any help would be appreciated. </p>