Triple Key Match with nulls

J

JimS

I have a very complex query that boils down to matching subqueries together
using three keys, constituting a single, unique key. Project, Equipment ID
(may be null), and Trade. What will happen when I join 7 subqueries by the
three keys and Equipment ID is in some cases?
 
K

KARL DEWEY

What will happen when I join 7 subqueries by the three keys and Equipment
ID is in some cases?
Try it, one subquery at a time.

Seven seems like a lot. Tell some more of want you are trying to accomplish
and maybe someone might suggest an alternative.

Post the SQL.
 
J

John Spencer

Null never matches anything including null. So if you have a null value in
Equipment ID any record you attempt to match on this will fail.

The best way to handle this is to force a value into the field. You can
update all the nulls to some specific value or use the NZ function to force a
value within a query.

John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top