If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Zero instead of null in query
Good morning. I would like the Uncosted Qty and Uncosted Value to show up
as zeros, when this query is run, instead of nothing. I'm pretty sure I need to add the Nz, but not sure how it should be added. Below is the code. SELECT Sum([OPS Numbers].Qty) AS [Uncosted Qty], Sum([OPS Numbers].Value) AS [Uncosted Value], [OPS Numbers].Gross FROM [OPS Numbers] GROUP BY [OPS Numbers].Gross, [OPS Numbers].Costed, [OPS Numbers].Type HAVING ((([OPS Numbers].Gross)"credit") AND (([OPS Numbers].Costed) Like "Uncosted") AND (([OPS Numbers].Type) Like "N")); Thanks! Lori -- Message posted via http://www.accessmonster.com |
#2
|
|||
|
|||
Zero instead of null in query
SELECT Nz(Sum([OPS Numbers].Qty),0) AS [Uncosted Qty],
Nz(Sum([OPS Numbers].Value),0) AS[Uncosted Value], [OPS Numbers].Gross FROM [OPS Numbers] GROUP BY [OPS Numbers].Gross, [OPS Numbers].Costed, [OPS Numbers].Type HAVING ((([OPS Numbers].Gross)"credit") AND (([OPS Numbers].Costed) Like "Uncosted") AND (([OPS Numbers].Type) Like "N")); Vanderghast, Access MVP "Lori2836 via AccessMonster.com" u23986@uwe wrote in message news:9ad4f4918c815@uwe... Good morning. I would like the Uncosted Qty and Uncosted Value to show up as zeros, when this query is run, instead of nothing. I'm pretty sure I need to add the Nz, but not sure how it should be added. Below is the code. SELECT Sum([OPS Numbers].Qty) AS [Uncosted Qty], Sum([OPS Numbers].Value) AS [Uncosted Value], [OPS Numbers].Gross FROM [OPS Numbers] GROUP BY [OPS Numbers].Gross, [OPS Numbers].Costed, [OPS Numbers].Type HAVING ((([OPS Numbers].Gross)"credit") AND (([OPS Numbers].Costed) Like "Uncosted") AND (([OPS Numbers].Type) Like "N")); Thanks! Lori -- Message posted via http://www.accessmonster.com |
#3
|
|||
|
|||
Zero instead of null in query
Thank you!
vanderghast wrote: SELECT Nz(Sum([OPS Numbers].Qty),0) AS [Uncosted Qty], Nz(Sum([OPS Numbers].Value),0) AS[Uncosted Value], [OPS Numbers].Gross FROM [OPS Numbers] GROUP BY [OPS Numbers].Gross, [OPS Numbers].Costed, [OPS Numbers].Type HAVING ((([OPS Numbers].Gross)"credit") AND (([OPS Numbers].Costed) Like "Uncosted") AND (([OPS Numbers].Type) Like "N")); Vanderghast, Access MVP Good morning. I would like the Uncosted Qty and Uncosted Value to show up [quoted text clipped - 12 lines] Thanks! Lori -- Message posted via http://www.accessmonster.com |
Thread Tools | |
Display Modes | |
|
|