First and foremost - it is a homework assignment, yet I am not asking for anyone to do it. Instead I need help with how to construct the query.
As part of an assignment, using the Northwind database via Microsoft Access, I have to construct this query:
The product ID, product name, and quantity ordered for all products ordered on an order taken by an employee with last name Fuller.
Now, when I construct the query in design mode, this is the code I get:
SELECT Products.ProductID, Products.ProductName, [Order Details].Quantity
FROM Products INNER JOIN ((Employees INNER JOIN Orders ON Employees.EmployeeID = Orders.EmployeeID) INNER JOIN [Order Details] ON Orders.OrderID = [Order Details].OrderID) ON Products.ProductID = [Order Details].ProductID
WHERE (((Employees.LastName)="Fuller"));
As I mentioned earlier, we are not allowed to use Inner Join. After scouring the text/notes thus far I can't find how to go about it. (Very new to SQL)
Would I be rewriting the FROM statement? And if so, do the SELECT and WHERE statements change?
UPDATE: Here is the code as I rewrote it:
SELECT Orders.OrderID, Orders.CustomerID, Orders.ShipCity
FROM Products, Orders, [Order Details], Employees
WHERE
Products.ProductID = [Order Details].ProductID
AND Employees.EmployeeID = Orders.EmployeeID
AND Ordes.OrderID = [Order Details].OrderID
AND Employees.LastName = "Fuller";
I'm having a sort of syntax issue though. Since the Order Details must be enclosed in brackets, it wants to ask for parameter values for what I wrote in the WHERE statement.