473,394 Members | 2,100 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,394 software developers and data experts.

IsNull columns

I have a table in Acces 2007 that has 24 columns that can contain null values. I want the records that have the null values to display. I am kind of new to this so any help I can get would be appreciated.

The columns I am trying to get the null values from are titled 1st Rating, 2nd rating, 3rd rating, etc. I have tried the IsNull, but it only returns the rating for the 1st rating and not the other columns.

Can you please tell me how to do this?
Aug 2 '11 #1
4 1588
Rabbit
12,516 Expert Mod 8TB
If you have no where condition that limits the display of nulls, then nulls will display.
Aug 2 '11 #2
NeoPa
32,556 Expert Mod 16PB
Joyce, your question makes no discernable sense. Are you saying you want to show only those records where there is at least one column that is Null?
Aug 4 '11 #3
Mihail
759 512MB
I think so, NeoPa.
And I "see" only one solution.
I am sure that is a good one if all the fields are numeric:

Create a new column (i.e "N" ) in your query based on SUM formula (sum all fields where you are looking for null values N = F1+F2+...Fk). If in a record you have one ore more null values in fields F1, F2 .... then you obtain a null value in field "N". If there are not null values in the record, the "N" field will be not null.
Now you can use IsNull in field "N".

Hope this is a help for you.

Maybe others can explain how to use the same logic for fields with non numeric values.

Good luck !
Aug 4 '11 #4
NeoPa
32,556 Expert Mod 16PB
If we assume that's right for now Mihail, then your solution would indeed work. The string equivalent (which can also be used for non-string fields too) woul be, strangely enough, exactly the same ;-) While [X] & [Y] & [Z] would return Null only if all the values were Null, [X] + [Y] + [Z] gives a string result (unless all fields are defined as numeric) if there are no Null values, but a Null if any are Null (See Using "&" and "+" in WHERE Clause).

All that said, I would recommend simply checking each field individually and using OR between each result :
Expand|Select|Wrap|Line Numbers
  1. WHERE ([X] Is Null)
  2.    OR ([Y] Is Null)
  3.    OR ([Z] Is Null)
This is easier (and quicker) for the SQL engine to process.

That said, knowing why your suggestion works is always a good understanding to have ;-)
Aug 4 '11 #5

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

Similar topics

5
by: JackT | last post by:
Hi, I have the following SQL SELECT Table1.Col1, Table3.Col1 AS Expr1, COUNT(Table1.Col2) AS Col2_No, COUNT(Table1.Col3) AS Col3_No etc, FROM Table3 INNER JOIN Table2 ON...
7
by: Pooj | last post by:
have a urgent requirement. Please somebody help me. I have a table departinfo with following records begin_time end_time Name Pieces 10:00 10:15 PopCorn ...
2
by: Trev | last post by:
I have two tables, tblMTO and tblIMPORT_MTO. If I import an entire MTO into the import table I want to create a delta from it (i.e. leave only the changed items). I have a view (simplified) ...
8
by: NickName | last post by:
Hi, I seemed to me IsNull Evaluation within EXEC fails. Here's some more detail of the problem. -- goal: provide one parameter (of various value) to generate a -- report declare @col4...
3
by: Jan Nielsen | last post by:
Hi I am working with rowfilters in dataviews. I would like to filter for empty fields (= null value in the database) I found this sentence on msdn: **************** To return only those columns...
2
by: scott.k.fraley | last post by:
....and the SELECT thats trying to pull from said Query doesn't like it one bit! ;) I'm working on this project (in Access 2002) and there is a report who's RecordSource is the following...
4
by: Paul Spratley | last post by:
Hi all Firstly this my first time posting to technical groups - so any mistakes I apologise for in advance. I am trying to count records in several secondary tables for the same run in a...
9
by: serge | last post by:
/* Subject: How to build a procedure that returns different numbers of columns as a result based on a parameter. You can copy/paste this whole post in SQL Query Analyzer or Management Studio...
13
by: lithoman | last post by:
I'm stumped here. I run the procedure Batch_Select against the database with @ID=18 and I get the expected data. When it loads into a SqlDataReader, it gets messed up somehow. Initially, after the...
1
by: krishnaroopa | last post by:
I have a sequence of 20 stored procedures executed to produce the final output. In almost all procedures, i have a table lookup. The query is something similar to shown below: SELECT * FROM...
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: 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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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.