TheInsider
Programmer
Hi,<br> Thanks to MalcolmW I have the idea of how to solve my last problem. I am fairly new to SQL and when I implemented a test case I got a syntax error in the FROM clause and the second SELECT keyword was highlighted. Below is the SQL statement:<br><br>PARAMETERS PID Text;<br>SELECT Clients.FirstName, Clients.MiddleInitial, Clients.LastName, qryQuantities.SumOfQuantity<br>FROM Clients RIGHT JOIN (<font color=blue><b>SELECT</b></font> Orders.SocialInsuranceNumber, Sum(Orders.Quantity) AS SumOfQuantity<br>FROM Orders WHERE (((Orders.ProductID)=[PID])) GROUP BY Orders.SocialInsuranceNumber) AS qryQuantities ON Clients.SocialInsuranceNumber = qryQuantities.SocialInsuranceNumber;<br><br>I think I'm missing a '(' or have one in the wrong place? I'm not proud to be asking for help on something this minor!<br><br>