473,385 Members | 1,353 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Null or empty

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
2 2251
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
"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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Kris M | last post by:
How do i handle a null value for a date variable type. I am retrieving date data from an access database and storing the records in an array for processing. The array field has a date type and the...
2
by: FizzBin | last post by:
We are writing a C application that is using ODBC to insert records into a database. We have a NOT NULL column that can legitimately have an empty value, i.e. we know the value and it is empty...
12
by: AFN | last post by:
I am running the code below to generate XML from a data table. But some fields in the data table are Null for every record. Suppose field5 has a null database value. I would expect to see: ...
8
by: Lyn | last post by:
I am trying to get my head around the concept of default, special or empty values that appear in Access VBA, depending on data type. The Access Help is not much (help), and the manual that I have...
9
by: ken | last post by:
Hi, I was wondering when you have an empty cell, its value is null in the debugger. So when you have an expression like this: "if len(mycell) < 1 then", or if you have "if mycell = null then" I...
5
by: tshad | last post by:
I have the following code: *************************************************************************** Dim CommandText as String = "INSERT INTO ftsolutions.dbo.position (client,dateposted) VALUES...
8
by: wjdennis | last post by:
I'm looking at a table with two date/time columns in it. One colulmn has its Default Value set to Null, the other has nothing in the Default Value entry. What is the difference between these two...
7
by: kumar.senthil | last post by:
Hi, I'm using XmlSerializer to create an object from the XML string. I would like to know whether I can get a null value for an empty XML element. Actually the XmlSerializer assigns "" (empty...
6
by: db2admin | last post by:
hello, db2 does not recognize '' as null? say i have T1(C1 INT,C2 CHAR(4)) and i insert (1,'') , it would not be same as (1,NULL) what db2 consider '' as? how does it store value '' as if not...
4
by: Eric Layman | last post by:
Hi everyone, Im puzzled by a NULL behaviour in SQL 2000 server. There is a column in the table that does not allow NULL. During data mining, the staff noted that, for that particular column,...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.