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
|
|||
|
|||
"Null"
when a numerical query returns empty how do you make it show as 0?
|
#2
|
|||
|
|||
You can use the Nz() function to replace a null to
whatever value you wish. The format is: Nz(expression, value) where expression could be a single field name or more complex expression, and value can be numeric (such as 0 in your case), or a string enclosed in quotes. HTH, Ted Allen -----Original Message----- when a numerical query returns empty how do you make it show as 0? . |
#3
|
|||
|
|||
By using the NZ function e.g.
SELECT Nz(numberColumn,0) will return a 0 if the numbercolumn is blank. Hope This Helps Gerlad Stanley MCSD -----Original Message----- when a numerical query returns empty how do you make it show as 0? . |
#4
|
|||
|
|||
Have you tried the nz function (null to zero)? Just
replace the field that is returning nulls, e.g. "Cost" to nz([Cost]). |
#5
|
|||
|
|||
-----Original Message----- when a numerical query returns empty how do you make it show as 0? . In the query design view, put this in the Field Row Value:Nz([field],0) Look up Nz in help (Null suppressed, first parameteris inpt, second parameter is value if null) |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
UNION Query with Criteria | Dkline | Running & Setting Up Queries | 1 | August 4th, 2004 09:15 PM |
Need someone to look at SQL statement | Dkline | Running & Setting Up Queries | 4 | August 3rd, 2004 05:12 PM |
"UNION" Query with different fields in the two tables | Dkline | Running & Setting Up Queries | 5 | July 30th, 2004 09:05 PM |
UNION query question | Dale Peart | Running & Setting Up Queries | 6 | July 14th, 2004 12:26 AM |
Access inconsistencies | Hoopie | Running & Setting Up Queries | 2 | June 15th, 2004 10:53 AM |