A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

"Null"



 
 
Thread Tools Display Modes
  #1  
Old August 19th, 2004, 07:43 PM
DBC
external usenet poster
 
Posts: n/a
Default "Null"

when a numerical query returns empty how do you make it show as 0?
  #2  
Old August 19th, 2004, 07:57 PM
Ted Allen
external usenet poster
 
Posts: n/a
Default

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  
Old August 19th, 2004, 08:01 PM
Gerald Stanley
external usenet poster
 
Posts: n/a
Default

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  
Old August 19th, 2004, 08:25 PM
Al
external usenet poster
 
Posts: n/a
Default

Have you tried the nz function (null to zero)? Just
replace the field that is returning nulls, e.g. "Cost" to
nz([Cost]).
  #5  
Old August 26th, 2004, 12:44 PM
external usenet poster
 
Posts: n/a
Default


-----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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

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


All times are GMT +1. The time now is 02:43 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.