468,241 Members | 1,420 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,241 developers. It's quick & easy.

Problem with Quersy

My database if for a shop.

I have a query that adds up the quantity of stock that i have bought
and also the quantity of stock i have sold.. Therfor i can work out the
amout of stock left in stock.

Teh problem when i run the query is that if i have not sold any items
of one product it does not show up in the query.

how do i get it to show all the products i have bought but then if i
have not sold any it displays '0' in stead of not desplaying the
recored,

Thanks

Simon

Oct 9 '06 #1
1 938
J
Hello Simon:

Open the query in design view.
Now right click and open it in SQL View.

Look around until you find sum(blahblahblah) and manually replace every
one with sum(Nz(blahblahblah,0)). Now run the query.

Nz(Expression, ValueIfNull) means "Display THIS, except when it's null
display THAT"

Cheers,
~J

Simon wrote:
My database if for a shop.

I have a query that adds up the quantity of stock that i have bought
and also the quantity of stock i have sold.. Therfor i can work out the
amout of stock left in stock.

Teh problem when i run the query is that if i have not sold any items
of one product it does not show up in the query.

how do i get it to show all the products i have bought but then if i
have not sold any it displays '0' in stead of not desplaying the
recored,

Thanks

Simon
Oct 9 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Bruce Davis | last post: by
11 posts views Thread by Kostatus | last post: by
117 posts views Thread by Peter Olcott | last post: by
28 posts views Thread by Jon Davis | last post: by
6 posts views Thread by Ammar | last post: by
2 posts views Thread by Mike Collins | last post: by
1 post views Thread by Matik | last post: by
reply views Thread by NPC403 | last post: by
reply views Thread by kermitthefrogpy | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.