Search code examples
sqlms-accessjoinms-access-2016

Syntax error on join operation access SQL


I'm trying to do some join operations in sql access but I keep on getting the join operation error. At first it was just the JOIN alone, but then I realized I had to add the INNER which I did but it didn't resolve the error.

Code below:

SELECT Formula.*, Ingred.[Europe Ban] 
FROM [Ingred]  
INNER JOIN Ingred ON Formula.[Ingredient] = Ingred.Ingredients;

Solution

  • Presumably, you want Formula in the FROM clause, not Ingred twice:

    SELECT Formula.*, Ingred.[Europe Ban]
    FROM Formula INNER JOIN
         Ingred
         ON Formula.[Ingredient] = Ingred.Ingredients;