wlwebb
asked on
Access - Query for Results where JOIN NOT Equal
Followup to this EE Question
I have a technical problem when I did this.
If I just do as you indicated above I get a list where it shows my TempClientAcctNbr and then every ClientAcctNbr from the other table where they don't match...
What I am needing is it to give me a list of TempClientAcctNbr if that same number doesn't show up in the ClientAcctNbr table.
SO in my inept ability I tried adding. a WHERE clause if the ClientAcctNbr table for that TempAcctNbr is null.
SELECT t1.*, t2.*
FROM TempClientTrialBalance AS t1, ClientAcctNbrs AS t2
WHERE (((IsNull([t2].[ClientAcct Nbr]))=Tue ));
I then went to my Temp table and changed one of the account number s so I knew I had a number that wasn't in the ClientAcctNbr table.
I don't get anything.
I have a technical problem when I did this.
If I just do as you indicated above I get a list where it shows my TempClientAcctNbr and then every ClientAcctNbr from the other table where they don't match...
What I am needing is it to give me a list of TempClientAcctNbr if that same number doesn't show up in the ClientAcctNbr table.
SO in my inept ability I tried adding. a WHERE clause if the ClientAcctNbr table for that TempAcctNbr is null.
SELECT t1.*, t2.*
FROM TempClientTrialBalance AS t1, ClientAcctNbrs AS t2
WHERE (((IsNull([t2].[ClientAcct
I then went to my Temp table and changed one of the account number s so I knew I had a number that wasn't in the ClientAcctNbr table.
I don't get anything.
Your syntax looks good but you've misspelled true in your IsNull check.
Replace "Tue" with "True" in your SQL Statement.
Replace "Tue" with "True" in your SQL Statement.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
dkrollCTN
I get
"The Microsoft Office Access database engine does not recognize 't2.*' as a valid field name or expression."
I get
"The Microsoft Office Access database engine does not recognize 't2.*' as a valid field name or expression."
ASKER
mbizup
When I run the query I don't get any results and I Know I have at least one that is a new account number in the TempClientTrialBalances table.
When I run the query I don't get any results and I Know I have at least one that is a new account number in the TempClientTrialBalances table.
SELECT t1.*
FROM TempClientTrialBalance AS t1
WHERE NOT EXISTS (SELECT t2.* FROM ClientAcctNbrs AS t2 WHERE t2.[ClientAcctNbr] = t1.[TempAcctNbr]);
FROM TempClientTrialBalance AS t1
WHERE NOT EXISTS (SELECT t2.* FROM ClientAcctNbrs AS t2 WHERE t2.[ClientAcctNbr] = t1.[TempAcctNbr]);
ASKER
JimHorn That one worked!!!!
FROM TempClientTrialBalance AS t1
WHERE NOT EXISTS (SELECT t2.* FROM ClientAcctNbrs AS t2 WHERE t2.[ClientAcctNbr] = t1.[TempAcctNbr]);