Use of IF in SQL query to check / replace field value

  • Thread starter Thread starter Ted
  • Start date Start date
T

Ted

You can also use the Nz() function, which has two parts.
The first part would be the value that you want to list,
the second part contains a number or string that you want
to return if the source value is null.

For example: Nz([YourFieldName],"Unknown Value")

-Ted
-----Original Message-----
Hi,

I have a situation where I would like to check the value
of a field to see if it is NULL and if it is then replace
it with a string such as "Unknown value". I would like
to do this as part of an SQL query which poulates the
rowsource of a list box. I do not want to update the
underlying data, the "Unknown value" text is for display
purposes in the list box only.
 
Dear Ted,
I have many problem using NZ function.
1) I' m working with Office 2003 and nz function does not give me any syntass error
but in the data sheet the display value is #Error.

2) If I try to use Office 2000 everything is ok in Acces,
but retriving data from excell (using get external data with database query)
the nz function does not work.

Can you help me?

Miki (Italy)
 
Back
Top