replacing all null values

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Is there a way to replace all null values to zeros?
I need to make this change in all fields in several tables, the UPDATE query
only allows me to do it one at a time, but I have hundreds of fields to
change.

Thanks,
 
You could write some code that would loop through tables and fields to
create update queries and execute them. You could find all numeric fields
and build SQL statements like:

UPDATE tblYourTable
SET Num1 With Nz(Num1,0),
Num2 With Nz(Num2,0),
Num3 With Nz(Num3,0);
 
Back
Top