473,395 Members | 1,537 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,395 software developers and data experts.

pull null value from either of the two columns or both columns

I am doing a query in access. I want to pull all the clients names that have a null value in two separate columns. I want everyone pulled that has a null value in either of the two columns or both of the columns. When I put "is Null" in both of the columns, it is only pulling clients names who are null in both columns. If a client is null in just one or the other column it does not pull them. I want it to pull everyone who is null in either of the columns or both of the columns
May 11 '10 #1

✓ answered by NeoPa

In your query grid, notice there is a row below the Criteria: one that reads Or:.

If you put the criteria for one column against the Criteria: row and the criteria for the other against the or: row then it will select records where either of the columns is blank.

NB. Multiple levels of OR can be handled this way by using the rows beneath.

4 2251
missinglinq
3,532 Expert 2GB
There's probably a slicker way, but this works, assuming the columns are both Text:
  1. In the Query Design Grid, create a calculated field: CombinedColumns:Nz([Column1]+[Column2],"EmptyField")
  2. Leave the "Show" checkbox unticked.
  3. In the Criteria Box enter: = "EmptyField"
Welcome to Bytes!

Linq ;0)>
May 11 '10 #2
NeoPa
32,556 Expert Mod 16PB
In your query grid, notice there is a row below the Criteria: one that reads Or:.

If you put the criteria for one column against the Criteria: row and the criteria for the other against the or: row then it will select records where either of the columns is blank.

NB. Multiple levels of OR can be handled this way by using the rows beneath.
May 12 '10 #3
@NeoPa
Thank you so very, very much. I did it and it worked! Thanks a million!!!
May 12 '10 #4
NeoPa
32,556 Expert Mod 16PB
Not a problem K. That's what we're all here for :)
May 12 '10 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

8
by: william | last post by:
Hi Whwn I select from database using ADO.NET, if the data is null value in database, how should I handle it (string, integer, boolean type field) Thank willia
0
by: richard | last post by:
Hi, I have a Schema for a Dataset which I am populating from Excel. One of the columns is a string datatype. When I Fill the Dataset I want any Null values to be set to a string value. I have...
1
by: Pekka Henttonen | last post by:
For some reason SQL0407N error messages never reveal the name of the column to which a NULL value has been assigned. Here is an example: SQL0407N Assignment of a NULL value to a NOT NULL column...
3
by: Przemo | last post by:
Hi, Imagine that we have a database and one table. Stored procedure returns 3 columns of table: ID, name, value. Name and value can be a null in database. How to map or represent such values in...
15
by: TC | last post by:
What does it mean for an integer to have a null value? I am trying to use the DataView.Find method. That method has an integer return type which contains the "index of the row in the DataView...
26
by: Martin R | last post by:
Hi, How to find first not null value in column whitout chacking whole table (if there is a not null value then show me it and stop searching, the table is quite big)? thx, Martin *** Sent...
2
by: BF | last post by:
Hi, I have some tables where I import data in, lots of field have gotten a NULL value which the application can not handle. Now can I replace each NULL value with '' in a columns with: update...
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,...
0
prabirchoudhury
by: prabirchoudhury | last post by:
CRITERIA; +-------------+--------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +-------------+--------------+------+-----+---------+-------+...
4
by: justice750 | last post by:
Hi All, I am using a FormView control. The allows me to update records in the database. However, when a database field is null I can not update the field on the form. It works fine when the field...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.