Replacing null values in a table

Benep87

New member
Local time
Today, 08:29
Joined
Jan 6, 2011
Messages
2
Hi all,

I have an access table with ~130 columns, all of which contain some null values. I need to replace all of these null values with zeros. I've seen lots of ways to replace null values within a single column, but repeating this action 130 times is pretty time consuming.

Does anyone know a quick way to replace ALL nulls with zeros throughout the table?

Thanks
Ben
 
Welcome to the forum.

130 field (columns) :eek: you might want to read up on Data Normalisation.

Having said that you could use an update query to find and replace Null values in a field with zero the SQL would look something like;
Code:
UPDATE [YourTableName] SET [YourTableName].[YourFiledName] = "0"
WHERE ((([YourTableName].[YourFiledName]) Is Null));
 
Hi John,

Thanks for the reply. It sounds like I will still need to replicate your SQL code 130 times, one for each field, right?
 
Design your DB properly. It will make future updates much easier
 

Users who are viewing this thread

Back
Top Bottom