Microsoft Access - Syntax error in Join operation

Megan Hufferd 1 Reputation point
2022-08-26T12:43:22.627+00:00

I am struggling with an access database. I cannot figure this out to save my life. I keep getting a syntax error in JOIN operation error. Can someone please help me? Below is the SQL data.

235199-image.png

SELECT Query1.CUSTOMER, Query1.INVOICE, Query1.DATE_SHIP, Query1.DATE_ITEM_PROMISE, Query1.PART, Query1.Trim, Query1.ORDER_DESC, Query1.ORDER_NO, Query1.Qty_Shipped, Pricing.[Price], [Qty_Shipped]*[Price] AS [Ext Sales]
FROM Query1 LEFT JOIN Price ON Query1.Trim = Pricing.[Part]
WHERE (((Query1.DATE_SHIP) Between [Start Date] And [End Date]));

Microsoft 365 and Office Access Development
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Olaf Helper 47,436 Reputation points
    2022-08-26T12:48:58.187+00:00

    FROM Query1 LEFT JOIN Price ON Query1.Trim = Pricing .[Part]

    There is a typo in the table name; you JOIN on PRICE and in JOIN condition you have PRICING.


  2. Olaf Helper 47,436 Reputation points
    2022-08-26T13:22:59.01+00:00

    , Pricing.[Price], [Qty_Shipped] * [Price] AS [Ext Sales]

    In the first "Price" column you use correctly the table name "Pricing" to address it, in the second for the calculation not; change it to

    Pricing.[Price],  Query1.[Qty_Shipped] * Pricing.[Price] AS [Ext Sales]  
    

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.