Puting all the null field to 0

  • Thread starter Thread starter Guest
  • Start date Start date
You can use an Update query to convert Null values to zero, e.g.:
UPDATE MyTable SET MyField = 0 WHERE MyField Is Null;

Before you do that, you might wish to consider why this is needed. If it is
just that you are having difficulty handling the nulls, see:
Nulls: Do I need them?
at:
http://allenbrowne.com/casu-11.html

Alternatively, if you just need this for a particular situation, you can use
Nz() or IIf() as a calculated field in a query to substitute zeros for nulls
in that context.

If you have lots of repeating fields that contains nulls, such as Client1,
Client2, Client3, or Jan, Feb, Mar, the ultimate solution will be to
redesign this so you have many *records* in a related table, instead of many
repeating fields in one table.
 
Em...accually i want all null into 0 because when i print the report i dont
want show null field,i wanna show all to 0 than empty field,thanks for the
help!
 
Back
Top