By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,400 Members | 953 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,400 IT Pros & Developers. It's quick & easy.

Null or empty

P: n/a
I have a table with the fields Category 1, 2, and 3. When I run a
unique-value query on only those three fields I get, amongst the other
records, 2 records that have the same values:
Cat1 Cat2 Cat3
MyValue1 MyValue2 Shows no value
MyValue1 MyValue2 Shows no value
For other records that have identical entries for Cat1 and Cat2 and no
values for Cat3 that's not happening, I just get one record. In the past I
have worked with default value "" in this table and I'm assuming some of the
values in Cat3 are really empty and some of them have the value "" which I
guess is the reason I get 2 records that look identical. I'd like to do a
find and replace action to make sure all Cat3 values for the particular
records are empty. I've tried several search conditions but can't figure out
how to make a field's value empty. Also, what is the find string to search
for any value in a field, empty or not empty? ** only works for values that
are not null.
Any ideas?
Thanks,
john
Oct 7 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
john wrote:
I have a table with the fields Category 1, 2, and 3. When I run a
unique-value query on only those three fields I get, amongst the other
records, 2 records that have the same values:
Cat1 Cat2 Cat3
MyValue1 MyValue2 Shows no value
MyValue1 MyValue2 Shows no value
For other records that have identical entries for Cat1 and Cat2 and no
values for Cat3 that's not happening, I just get one record. In the
past I have worked with default value "" in this table and I'm
assuming some of the values in Cat3 are really empty and some of them
have the value "" which I guess is the reason I get 2 records that
look identical. I'd like to do a find and replace action to make sure
all Cat3 values for the particular records are empty. I've tried
several search conditions but can't figure out how to make a field's
value empty. Also, what is the find string to search for any value in
a field, empty or not empty? ** only works for values that are not
null. Any ideas?
Thanks,
john

Use an update query.

UPDATE TableName
SET Cat3 = Null
WHERE Cat3 = ""

You will need to run two separate queries to fix Cat1 and Cat2 in the same way.

--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com
Oct 7 '06 #2

P: n/a
"Rick Brandt" <ri*********@hotmail.comschreef in bericht
news:F4******************@newssvr25.news.prodigy.n et...
Use an update query.

UPDATE TableName
SET Cat3 = Null
WHERE Cat3 = ""

You will need to run two separate queries to fix Cat1 and Cat2 in the same
way.
Great, that did it!
thanks,
john

Oct 7 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.