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

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

Back
Top