Query

H

h3llz

I've got this inside a query, but i want to add a WHERE, which only when
quantity isnt a negative value, (quantity within tblProductsLog can be 10 or
-10). Any suggestions?

SELECT tblProducts.productID, tblProducts.product, tblProducts.price,
tblProducts.staffID, tblProducts.productType, tblProducts.deleted,
Sum(tblProductsLog.quantity) AS quantity, tblProducts.reduction
FROM tblProducts INNER JOIN tblProductsLog ON tblProducts.productID =
tblProductsLog.productID
GROUP BY tblProducts.productID, tblProducts.product, tblProducts.price,
tblProducts.staffID, tblProducts.productType, tblProducts.deleted,
tblProducts.reduction
HAVING (((tblProducts.deleted)=No));
 
D

Dorian

Look up the syntax of the SELECT clause in Access Help - it will show you
where to put the WHERE clause.

-- Dorian
"Give someone a fish and they eat for a day; teach someone to fish and they
eat for a lifetime".
 
D

Dale Fye

Sometimes the best way to teach is by example. Then explain the solution.

;-)

--
Dale

email address is invalid
Please reply to newsgroup only.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top