unmatched query

C

c8tz

I have created a table such that it contains the records that should
be present that are not in the "real" table.

eg.
Area Block Tree
1 1 1
1 1 2
1 1 3
1 1 4
1 2 1
1 2 2
1 2 3
1 2 4


The "real" table has
Area Block Tree
1 1 2
1 1 3
1 1 4
1 2 1
1 2 3
1 2 4

My query should show:
Area Block Tree
1 1 1
1 2 2


Tried using the Unmatched query but does not give what i want.

Thanks for the help.
 
G

Guest

Let me make sure I understand what you want.

You want to identify, for each Block, those records which are missing.
That is to say, those records where there is a value missing in the range
between 1 and 4 in the Tree column? Actually, I assume that the 4 in your
example is just that, and that there could be hundreds of trees in each block.

Is that correct?

Dale
 
M

Michel Walsh

You have the two tables, theRigthOne and theWrongOne ?


SELECT theWrongOne.*
FROM theWrongOne LEFT JOIN theRightOne
ON theWrongOne.area = theRightOne.area
AND theWrongOne.block= theRightOne.block
AND theWrongOne.tree= theRightOne.tree
WHERE theRightOne.area IS NULL



Hoping it may help,
Vanderghast, Access MVP
 

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