How to replace blank (null ) values with 0 for all records?

后端 未结 11 1587
情歌与酒
情歌与酒 2020-12-30 03:53

MS Access: How to replace blank (null ) values with 0 for all records?

I guess it has to be done using SQL. I can use Find and Replace to replace 0 with blank, but n

11条回答
  •  悲&欢浪女
    2020-12-30 04:47

    I used a two step process to change rows with "blank" values to "Null" values as place holders.

    UPDATE [TableName] SET [TableName].[ColumnName] = "0"
    WHERE ((([TableName].[ColumnName])=""));
    
    UPDATE [TableName] SET [TableName].[ColumnName] = "Null"
    WHERE ((([TableName].[ColumnName])="0"));
    

提交回复
热议问题