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

Is Null Problem

134 100+
I have a textfield called "POComplete" in my table - Vendor,
when the po is completed, it will write "OK" onto this field, otherwise
the "POComplete" is blank or null.

So I am trying to list out all outstanding PO using query,
In the Criteria - Field -"POComplete" , I indicate Is Null. When I run the query,
I realize not all outstanding PO was listed out. what wrong ?, only 90 records
out of 109 records was listed.


I physically count the table, Total records in the Vendor table was 164,
55 records indicate "OK" in the "POComplete" , (164 - 55) therefore 109 records
should be outstanding.But only 90 records was listed out, 19 records was missing.


Next, this time round, I change the Criteria to- Is Not Null, surprise to
see that some of the POComplete which is blank or null is displayed together
with those not null records. Additional 19 null records was display.

Is the table corrupted ?
Jan 19 '08 #1
6 1854
Megalog
378 Expert 256MB
Your table is fine..
You have 90 nulls, and 74 with values (19 of those being blank and 55 having "Ok").

So the criteria for outstanding PO's would be:
isnull(POComplete) = true OR POComplete = ""

Completed PO's would be the opposite:
isnull(POComplete) = false AND POComplete <> ""
or
POComplete = "OK"
Jan 19 '08 #2
jamesnkk
134 100+
Your table is fine..
You have 90 nulls, and 74 with values (19 of those being blank and 55 having "Ok").

So the criteria for outstanding PO's would be:
isnull(POComplete) = true OR POComplete = ""

Completed PO's would be the opposite:
isnull(POComplete) = false AND POComplete <> ""
or
POComplete = "OK"
Thanks you for your reply, but I don't understand why would 19 records with blank consider as value instead of null ? this 19 records are filled with other information, only the field - "POComplete" is blank.

I tried to put your statement under the field in the criteria column, but nothing come out.
Jan 20 '08 #3
jamesnkk
134 100+
Your table is fine..
You have 90 nulls, and 74 with values (19 of those being blank and 55 having "Ok").

So the criteria for outstanding PO's would be:
isnull(POComplete) = true OR POComplete = ""

Completed PO's would be the opposite:
isnull(POComplete) = false AND POComplete <> ""
or
POComplete = "OK"
I think I know why, in my statement I wrote , if po not complete I would write pocomplete="", so that cause the different between "" and null.

For O/S PO -
I insert a column for POComplete, in the Criteria = ""
Next I insert another column- IsNull([povendor].[pocomplete]=True)
Then in the "Or" column - <> False
-----------------------------------------------------------------------------------------------------
For Completed PO

I insert a column for POComplete,
In the "Or" column - <> "", I think this statement would take care of null and ""
Jan 20 '08 #4
NeoPa
32,556 Expert Mod 16PB
Just a minor point, but in SQL it's better to use the form
Expand|Select|Wrap|Line Numbers
  1. X Is Null
than
Expand|Select|Wrap|Line Numbers
  1. IsNull(X)
Is Null is intrinsic whereas IsNull() is a function that needs to be called (for every record generally).
Jan 21 '08 #5
jamesnkk
134 100+
Just a minor point, but in SQL it's better to use the form
Expand|Select|Wrap|Line Numbers
  1. X Is Null
than
Expand|Select|Wrap|Line Numbers
  1. IsNull(X)
Is Null is intrinsic whereas IsNull() is a function that needs to be called (for every record generally).
Thanks I learned something new
Jan 28 '08 #6
NeoPa
32,556 Expert Mod 16PB
Glad to help James :)
Jan 28 '08 #7

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

Similar topics

1
by: Sascha | last post by:
Hi I need some help on achieving the following: I wrote a querie which collects Data out of three Tables, the Result looks like this: SET NOCOUNT ON DECLARE @ROW INT
5
by: David Sworder | last post by:
Hi, I've created a UserControl-derived class called MyUserControl that is able to persist and subsequently reload its state. It exposes two methods as follows: public void Serialize(Stream...
7
by: am72de | last post by:
Hi all, I've posted this problem some weeks ago, but noone had a solution. Perhaps now someone could help me. I have the following tables: Create Table T1 ( ID1 int Not Null , ID2 int Not...
27
by: David W | last post by:
I'm almost tearing my hair out. A colleague claimed that a null reference can exist, like this: void f( int& p ) { printf( "%d\n", p ); } int main (int argc, char *argv) {
3
by: Jon L | last post by:
Hi, I'm hoping someone can help me with this problem. I'm not sure whether the problem lies with the software or with my understanding of the language. I'm using the Microsoft.XMLDOM object...
1
by: connor7777 | last post by:
Hi guys: We've been weeding out errors off of a java->c# project and have managed to redeem most of our code with the exception of one bug that we for some reason cannot pin down. The following...
4
by: Debbiedo | last post by:
I searched the groups and tried several approaches but still cannot find a solution. I have a table that has several hundred fields that may or may not need to be displayed in a report,...
8
by: A. Anderson | last post by:
Howdy everyone, I'm experiencing a problem with a program that I'm developing. Take a look at this stack report from GDB - #0 0xb7d782a3 in strlen () from /lib/tls/i686/cmov/libc.so.6 #1 ...
0
prabirchoudhury
by: prabirchoudhury | last post by:
CRITERIA; +-------------+--------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +-------------+--------------+------+-----+---------+-------+...
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.