A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Linking on field that allows nulls



 
 
Thread Tools Display Modes
  #1  
Old April 30th, 2010, 02:36 PM posted to microsoft.public.access.queries
K Essmiller[_2_]
external usenet poster
 
Posts: 4
Default Linking on field that allows nulls

I have two queries that I need to link together on several fields. I need to
link on a PPOCode that is sometimes null. I need a count of claims for each
PPOCode. I get the count for all of the codes except the null codes. I need
to know how to get it to recognize this link. I also want to know if there is
a setting somewhere in preferences, or somewhere like that, that dictates how
null values are treated. I'm sure the newer versions are handling nulls
differently than they used to or a setting is different.
  #2  
Old April 30th, 2010, 07:11 PM posted to microsoft.public.access.queries
Jeff Boyce
external usenet poster
 
Posts: 8,621
Default Linking on field that allows nulls

I may be missing something here ...

A "null" means that there's no way to know. This isn't the same as a "0"
(nothing, none of, ...).

So how are you proposing to "link" on a field when it (sometimes) contains
"no-way-to-know"? To what would that connect?

The Nz() function gives you a way of converting a null to some other value,
BUT !!! If I tell you there's 0 inches of rainfall, you know there was
none. If I tell you I don't know if it's raining, that's a totally
different matter! Are you sure you want to convert your nulls?


Regards

Jeff Boyce
Microsoft Access MVP

--
Disclaimer: This author may have received products and services mentioned
in this post. Mention and/or description of a product or service herein
does not constitute endorsement thereof.

Any code or pseudocode included in this post is offered "as is", with no
guarantee as to suitability.

You can thank the FTC of the USA for making this disclaimer
possible/necessary.

"K Essmiller" wrote in message
...
I have two queries that I need to link together on several fields. I need
to
link on a PPOCode that is sometimes null. I need a count of claims for
each
PPOCode. I get the count for all of the codes except the null codes. I
need
to know how to get it to recognize this link. I also want to know if there
is
a setting somewhere in preferences, or somewhere like that, that dictates
how
null values are treated. I'm sure the newer versions are handling nulls
differently than they used to or a setting is different.



  #3  
Old May 4th, 2010, 06:01 PM posted to microsoft.public.access.queries
K Essmiller[_2_]
external usenet poster
 
Posts: 4
Default Linking on field that allows nulls

OK. What you said makes sense. Perhaps I don't totally understand nulls. Does
Access do something behind the scenes so that nulls display like a zero
length entry? Nothing displays in any of these fields. What I want are the
fields with values to match on like values and the ones with null,
zero-length, or whatever you want to call them to match also. I've just
become aware of the nz() function which looks helpful, but what do you do on
links?

I also want to know if there are setting on how to handle nulls. I am
continually finding more places where Access does wierd and unexpected things
with null values that I don't think it used to to in previous versions.



"Jeff Boyce" wrote:

I may be missing something here ...

A "null" means that there's no way to know. This isn't the same as a "0"
(nothing, none of, ...).

So how are you proposing to "link" on a field when it (sometimes) contains
"no-way-to-know"? To what would that connect?

The Nz() function gives you a way of converting a null to some other value,
BUT !!! If I tell you there's 0 inches of rainfall, you know there was
none. If I tell you I don't know if it's raining, that's a totally
different matter! Are you sure you want to convert your nulls?


Regards

Jeff Boyce
Microsoft Access MVP

--
Disclaimer: This author may have received products and services mentioned
in this post. Mention and/or description of a product or service herein
does not constitute endorsement thereof.

Any code or pseudocode included in this post is offered "as is", with no
guarantee as to suitability.

You can thank the FTC of the USA for making this disclaimer
possible/necessary.

"K Essmiller" wrote in message
...
I have two queries that I need to link together on several fields. I need
to
link on a PPOCode that is sometimes null. I need a count of claims for
each
PPOCode. I get the count for all of the codes except the null codes. I
need
to know how to get it to recognize this link. I also want to know if there
is
a setting somewhere in preferences, or somewhere like that, that dictates
how
null values are treated. I'm sure the newer versions are handling nulls
differently than they used to or a setting is different.



.

  #4  
Old May 5th, 2010, 04:59 PM posted to microsoft.public.access.queries
Jeff Boyce
external usenet poster
 
Posts: 8,621
Default Linking on field that allows nulls

Do a bit of research on "nulls" ...

As I understand them (given that there's nothing there to understand g),
Nulls indicate nothing known.

As a recovering statistician, "0" (zero) means none-of-whatever, and isn't
the same thing as a null.

And Access includes the concept of a "zero-length-string", designated by two
quotes, nothing between them (""). This is not like EITHER of the two
preceding concepts! You could get one of these if you typed in a name, then
back-spaced until nothing showed. What's left is, I believe, a zls.

Finally, when you look at a field and see nothing, there's always the
possibility that there are any number of blanks/spaces.

You'll want to be testing for/handling each/all of these conditions!

Good luck!

Regards

Jeff Boyce
Microsoft Access MVP

--
Disclaimer: This author may have received products and services mentioned
in this post. Mention and/or description of a product or service herein
does not constitute endorsement thereof.

Any code or pseudocode included in this post is offered "as is", with no
guarantee as to suitability.

You can thank the FTC of the USA for making this disclaimer
possible/necessary.

"K Essmiller" wrote in message
...
OK. What you said makes sense. Perhaps I don't totally understand nulls.
Does
Access do something behind the scenes so that nulls display like a zero
length entry? Nothing displays in any of these fields. What I want are the
fields with values to match on like values and the ones with null,
zero-length, or whatever you want to call them to match also. I've just
become aware of the nz() function which looks helpful, but what do you do
on
links?

I also want to know if there are setting on how to handle nulls. I am
continually finding more places where Access does wierd and unexpected
things
with null values that I don't think it used to to in previous versions.



"Jeff Boyce" wrote:

I may be missing something here ...

A "null" means that there's no way to know. This isn't the same as a "0"
(nothing, none of, ...).

So how are you proposing to "link" on a field when it (sometimes)
contains
"no-way-to-know"? To what would that connect?

The Nz() function gives you a way of converting a null to some other
value,
BUT !!! If I tell you there's 0 inches of rainfall, you know there was
none. If I tell you I don't know if it's raining, that's a totally
different matter! Are you sure you want to convert your nulls?


Regards

Jeff Boyce
Microsoft Access MVP

--
Disclaimer: This author may have received products and services mentioned
in this post. Mention and/or description of a product or service herein
does not constitute endorsement thereof.

Any code or pseudocode included in this post is offered "as is", with no
guarantee as to suitability.

You can thank the FTC of the USA for making this disclaimer
possible/necessary.

"K Essmiller" wrote in message
...
I have two queries that I need to link together on several fields. I
need
to
link on a PPOCode that is sometimes null. I need a count of claims for
each
PPOCode. I get the count for all of the codes except the null codes. I
need
to know how to get it to recognize this link. I also want to know if
there
is
a setting somewhere in preferences, or somewhere like that, that
dictates
how
null values are treated. I'm sure the newer versions are handling nulls
differently than they used to or a setting is different.



.



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 05:15 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.