I have a query that was originally written in an MS Access database that I now need to put into SQL. I have encountered something I haven't seen before in the From Clause.
This is what I have written so far:
Select c.name, a.order_ref, p.product_code, u.amount, p.purchase_number, pc.purchase_code
From Customer c
Inner Join Action a
ON c.client_Id = a.client_id
Inner Join Products p
ON a.client_Id = p.client_id
AND a.product_no = p.product_no
This is the From Clause I am trying to translate from Access
FROM dbo_Customer INNER JOIN (dbo_Products INNER JOIN dbo_Action ON (dbo_Products.Product_No = dbo_Action.Product_No) AND (dbo_Products.Client_Id = dbo_Action.Client_Id)) ON dbo_Customer.Client_Id = dbo_Action.Client_Id**, (dbo_Uplift INNER JOIN dbo_Purchase ON dbo_Uplift.Payment_Ref = dbo_Purchase.Payment_Ref) INNER JOIN dbo_PurchaseCode ON dbo_Uplift.Purchase_Type = dbo_PurchaseCode.TypeCode**
How do I incorporate the last 3 tables (the section of the code starting with ** and ending with **) into the query I have started to write in SQL?
The use of the comma in the FROM clause is confusing to me, any assistance would be much appreciated.