title: Access: Change select to delete query
body: <p>I am sure this is an easy fix however it is baffling me at the moment – basically I want to change this query into a delete query </p>
  
  <pre><code>SELECT Raw_Log_Import_List.File_URL
  FROM Imported_Log_List, Raw_Log_Import_List
  WHERE ((Mid([Imported_Log_List].[File_URL],InStrRev([Imported_Log_List].[File_URL],"\")+1)= Mid([Raw_Log_Import_List].[File_URL],InStrRev([Raw_Log_Import_List].[File_URL],"\")+1)));
  </code></pre>
  
  <p>However when I try to run it as a delete I get a <code>specify table</code> <code>error – specifying the table [Raw_Log_Import_List] then generates a syntax error</code> </p>
  
  <p>I have tried running this as a subquery – see below </p>
  
  <pre><code>DELETE Raw_Log_Import_List.File_URL, *
  FROM Raw_Log_Import_List
  WHERE (((Raw_Log_Import_List.File_URL)=(SELECT Raw_Log_Import_List.File_URL
  FROM Imported_Log_List, Raw_Log_Import_List
  WHERE ((Mid([Imported_Log_List].[File_URL],InStrRev([Imported_Log_List].[File_URL],"\")+1)= Mid([Raw_Log_Import_List].[File_URL],InStrRev([Raw_Log_Import_List].[File_URL],"\")+1)));)));
  </code></pre>
  
  <p>However this generates a <code>at most one record can be returned..</code> error. </p>
  
  <p>I know I could solve this issue by creating another couple of calculated fields for the string manipulations however, I am keen to learn how to make this work with either a conventional delete or a sub query</p>
  
  <p>Cheers for your help as ever guys</p>