I am using Access to organize data from various spreadsheets and generate some information. I'm running into issues with a multi-table query where some of the data in one table is entered as 123456-7890 and in another it is 123456. Those same columns also have data that matches exactly, i.e. 123456789012 in both columns. So to boil it down, if there is a hyphen in the data then the match will only be on the first 6 characters; if there is not a hyphen then the match will be on the whole field.
To help figure this out I started a very simple query with just the 2 specific tables and I'm trying to do it piece by piece. I thought the code below might work but I get a "Syntax error in join operation" message. Once I get that part figured out I need to add the standard join (where the records in both tables match).
SELECT tblMaterialChanges.Drawing
FROM tblMaterialChanges INNER JOIN tblRequesters
ON (tblMaterialChanges.Drawing = Left(tblRequesters.[Number], 6) WHERE (((tblRequesters.Number) = "*-*"))
I'm obviously still learning so it's entirely possible my thinking is off track. Any help would be appreciated. Thanks.
To help figure this out I started a very simple query with just the 2 specific tables and I'm trying to do it piece by piece. I thought the code below might work but I get a "Syntax error in join operation" message. Once I get that part figured out I need to add the standard join (where the records in both tables match).
SELECT tblMaterialChanges.Drawing
FROM tblMaterialChanges INNER JOIN tblRequesters
ON (tblMaterialChanges.Drawing = Left(tblRequesters.[Number], 6) WHERE (((tblRequesters.Number) = "*-*"))
I'm obviously still learning so it's entirely possible my thinking is off track. Any help would be appreciated. Thanks.