This is for an assignment...
I am to
Write SQL out to display Customer's Last name, order date, product ID, fabric of the product, quantity ordered, and unit price. This must be a 4-table join and must user INNERJOIN even if where can be used.
These are the tables involved.
Cus (CID, Last, First, Phone)
Orders (OrdID, OrdDate, ShipDate, CID)
Manu (ManuID, Name, Phone, City)
Prods (PrID, ManuID, Category)
ProdFabric (PrID, Fabric, Price)
Orderline (OrdId, PrID, Fabric, Qty)
Bold means it is a primary key or part of a composite key.
Here is the query I entered, but I keep getting a Syntax error on FROM and it keeps highlighting Orders (after Cus INNERJOIN) for some reason.
SELECT Last, OrdDate, Prods.PrID, Fabric, Qty, Price
FROM Cus INNERJOIN Orders INNERJOIN Orderline INNERJOIN ProdFabric
ON OrderLine.PrID=ProdFabric.PrID
AND ON Orderline.Fabric=ProdFrabric.Fabric
AND ON Cus.CID=Orders.CID
AND ON Orders.OrdID=Orderline.OrdID;