Updating >100 fields with 0 when null

roland_access

Registered User.
Local time
Today, 23:54
Joined
Feb 13, 2002
Messages
35
I have a table with 108 fields.

For a given record, data will be in some fields but not all. The fields with data in changes for each record.

I need to update the records so that instead of a null value there is a 0. I cannot use the default value = 0 property of the table as the data is appended to it, null's and all.

Obviously I need to use the OR part of a query, but there can only be like 10 OR's per query as it doesnt scroll down. Can someone supply me with some SQL please?
 
Type this Update Query in the SQL View of a new query, replacing with the correct table name and field names:-

UPDATE TableName SET Field1=nz(Field1,0), Field2=nz(Field2,0),..., Field108=nz(Field108,0)


Run the query.
 
thanks, worked great
 

Users who are viewing this thread

Back
Top Bottom