Unmatched query

J

joebeagle

Our organization uses an online database which is owned and operated by the
State (HSN). I am developing a database for use within our company to keep
track of clients and client information. Perdiodically, I would like to
match/compare the 2 databases to see which clients have ended or just been
added that are not on the other database. I import the latest HSN information
and put it on a table called HSN kids.

The state database (HSN) does not seperate last name and first name like my
database does. Because of this, I have used a query on the underlying table
of my database to combine the names (sheet1 names combined). Now if I use an
unmatched query to compare which names are on my database that are not on the
state database, the query works fine:

SELECT [Sheet1 Names Combined].Expr1, [Sheet1 Names Combined].SSN, [Sheet1
Names Combined].[Case Status]
FROM [Sheet1 Names Combined] LEFT JOIN [HSN kids] ON [Sheet1 Names Combined].
Expr1 = [HSN kids].[Child Name]
WHERE ((([HSN kids].[Child Name]) Is Null));

But, if I try to compare names that are on the State database (HSN) that are
not on mine, I get no results even though I know there are names on the state
database that are not on mine:

SELECT [HSN kids].ID, [HSN kids].Unit, [HSN kids].[Primary Caseworker], [HSN
kids].[Case Name], [HSN kids].[Child Name], [HSN kids].[Date Of Birth], [HSN
kids].[Primary SSN], [HSN kids].[Florida Medicaid PIN], [HSN kids].
[Eligiblity Type], [HSN kids].[Eligiblity Begin Date], [HSN kids].[Eligiblity
End Date], [HSN kids].Field12
FROM [HSN kids] LEFT JOIN [Sheet1 Names Combined] ON [HSN kids].[Child Name]
= [Sheet1 Names Combined].Expr1
WHERE ((([Sheet1 Names Combined].Expr1) Is Null));

The same is true no matter which identifier you use (DOB, SSN).

What am I doing wrong?
 

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