Converting a null value to a predetermined text value

  • Thread starter Thread starter Jimball
  • Start date Start date
J

Jimball

I have a query where some results may be null. In this case, is it possible
to set a criteria to allow the query to return a result for a null value to
equal some text value?

For example: If null then = "Unreviewed"

Thanks
Jim
 
Jim,

Yes. The NZ( ) function will convert a NULL value to some predetermined (or
dynamically determined value.

SELECT Field1, Field2, NZ(Field3, "Default Value") as Field3a
FROM yourTable

HTH
Dale
 
Something like this in a query should work.

ReviewStatus: NZ([TheField],"Unreviewed")
 
Jimball:

Had a similar issue a few days ago and Conan (MS) and I had a discussion
going back and forth. Please see 2/21 "populating null value" from
Kristibaer. There are a few ideas there that all worked but I actually came
up with one that even the pro said "well that shouldn't work, but if it does
and it isn't broke, don't fix it".

Good luck.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Change Null Value to Text 1
#error - Blank 3
counting Null fields 3
Testing for null 4
Need null values for several fields in db 1
Totals Won't Count Nulls 1
Parameter queries and null values 2
Null Values 5

Back
Top