Wrox Home  
Search P2P Archive for: Go

  Return to Index  

access thread: Data with zero (0) values are not displayed


Message #1 by "Joseph Valdez" <e-valdez@a...> on Thu, 13 Mar 2003 01:12:40 -0800
Hi,
  I find it unusual that when I try to do the following query for example;

Select * from table where field1 <> 0.

Results:Resultset is empty

however if do the ff:

Select * from table where field1 is not null.
 Results: I get data back including all the 0 in field1 which I don't want.
Why?

any suggestions is much appreciated how to address the selection formula:

Thanks





Message #2 by Martyn Clark <martyn.clark@t...> on Thu, 13 Mar 2003 09:03:05 -0000
Joseph,

I think you confusion is that you are assuming 0 and null are the same
thing. Its my understanding that they are not. A field that contains a null
value means that it is empty, a field that contains a 0 value is not empty,
it simply contains zero.

The table in your example has had 0 entered into the field somehow, either
by yourself or by access itself in the form of a default value.

If you truly want fields in your records to contain nulls if nothing has
been entered by the user then, in the table definition, you will need to set
the Default Value property for the appropriate field to Null.

Martyn

-----Original Message-----
From: Joseph Valdez [mailto:e-valdez@a...]
Sent: 13 March 2003 09:13
To: Access
Subject: [access] Data with zero (0) values are not displayed


Hi,
  I find it unusual that when I try to do the following query for example;

Select * from table where field1 <> 0.

Results:Resultset is empty

however if do the ff:

Select * from table where field1 is not null.
 Results: I get data back including all the 0 in field1 which I don't want.
Why?

any suggestions is much appreciated how to address the selection formula:

Thanks






The contents of this e-mail are strictly confidential and are intended only
for the addressee named above. This e-mail may contain confidential or
privileged information. If you are not the intended recipient of this
message please notify the sender immediately. The contents of this e-mail
must not be disclosed to any other person or copies taken. Please note that
any views expressed in this e-mail may be those of the originator and do not
necessarily reflect those of this organisation. Internet e-mail is not a
secure communications medium. Please note this lack of security when
responding by e-mail. Accordingly we give no warranties or assurances about
the security and content of this e-mail and its attachments. Neither Thermo
Electron Corporation nor the sender accepts any responsibility or liability
for viruses and it is your responsibility to scan the e-mail and
attachments. Any liability arising from any third party acting on any
information contained in this e-mail is hereby excluded.          (c) Thermo
Electron Corporation www.thermo.com
Message #3 by "Gerald, Rand" <RGerald@u...> on Thu, 13 Mar 2003 09:52:20 -0600
Zero is not the same as NULL.

Rand E. Gerald
Database Specialist
Information Services / Operations
Bah=E1'=ED National Office
1233 Central St.
Evanston, IL  60201
(xxx) xxx-xxxx

-----Original Message-----
From: Joseph Valdez [mailto:e-valdez@a...]
Sent: Thursday, March 13, 2003 03:13
To: Access
Subject: [access] Data with zero (0) values are not displayed

Hi,
  I find it unusual that when I try to do the following query for 
example;

Select * from table where field1 <> 0.

Results:Resultset is empty

however if do the ff:

Select * from table where field1 is not null.
 Results: I get data back including all the 0 in field1 which I don't 
want.
Why?

any suggestions is much appreciated how to address the selection 
formula:

Thanks







  Return to Index