Hi, I have a problem using HAVING in my query. It's a big query and I post a part of it, hope it's enough to solve the problem. What i want to do is to compare the Q.result with a given number, say bigger than 1000. Is this possible by using HAVING, and if so, what am I doing wrong??
thanx
SELECT I2.i_name
FROM Ingredients2 I2,((SELECT II.i_name,Sum(II.amount) AS result
FROM ingred_is_in2 II
GROUP BY II.i_name) Q
HAVING (Q.result)>1000)
WHERE I2.currentamount <= Q.result
thanx
SELECT I2.i_name
FROM Ingredients2 I2,((SELECT II.i_name,Sum(II.amount) AS result
FROM ingred_is_in2 II
GROUP BY II.i_name) Q
HAVING (Q.result)>1000)
WHERE I2.currentamount <= Q.result