0

SELECT sum(GoodsRcpt.PurchQty) FROM GoodsRcpt where GoodsRcpt.GlsClr=" WHITE";

SELECT count(Prescriptions.SrNo)/2 FROM Prescriptions where
Prescriptions.GlsClr=" WHITE";

SELECT sum(GlassDamage.DamageQty) FROM GlassDamage where
GlassDamage.GlsClr=" WHITE";

Combine above three query and the equetion should be like, (result of
query1) - ( result of query 2 + result of query 3)

its urgent...
Thank you....

3
Contributors
5
Replies
6
Views
5 Years
Discussion Span
Last Post by sanket044
0

Try the sql below:

select (SELECT sum(GoodsRcpt.PurchQty) FROM GoodsRcpt where GoodsRcpt.GlsClr=" WHITE") - ((SELECT count(Prescriptions.SrNo)/2 FROM Prescriptions where Prescriptions.GlsClr=" WHITE") + (SELECT sum(GlassDamage.DamageQty) FROM GlassDamage where GlassDamage.GlsClr=" WHITE")) AS result;

0

ACTULY I AM TRYING A QUERY IN MS ACCESS..
IT GIVES ERROR AT " AS RESULT"

0

I see. Because I normally do that with SQL Server. It has been sometime since I last use MS ACCESS. Give me some time to figure it out.

0

Some databases don't support multiple queries combined into one.. so you can do nothing with it but execute them separately..

Edited by vjcagay: wrong grammar

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.