By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,705 Members | 1,795 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,705 IT Pros & Developers. It's quick & easy.

Problem with Quersy

P: n/a
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
Share this Question
Share on Google+
1 Reply


P: n/a
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.