如何将所有记录的空白(null)值替换为0? [英] How to replace blank (null ) values with 0 for all records?

查看:774
本文介绍了如何将所有记录的空白(null)值替换为0?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

MS Access:如何将所有记录的空白(空值)替换为0?

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

我猜想它必须使用SQL来完成.我可以使用查找并替换"将0替换为空格,但不能用另一种方式替换(即使我输入要插入空格的[Ctrl-空格键]也不会找到"空白.

I guess it has to be done using SQL. I can use Find and Replace to replace 0 with blank, but not the other way around (won't "find" a blank, even if I enter [Ctrl-Spacebar] which inserts a space.

所以我想我需要在SQL中找到MyField的空值,然后将它们全部替换为0.

So I guess I need to do SQL where I find null values for MyField, then replace all of them with 0.

推荐答案

转到查询设计器窗口,切换到SQL模式,然后尝试以下操作:

Go to the query designer window, switch to SQL mode, and try this:

Update Table Set MyField = 0
Where MyField Is Null; 

这篇关于如何将所有记录的空白(null)值替换为0?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆