BennyLinton
Registered User.
- Local time
- Today, 05:23
- Joined
- Feb 21, 2014
- Messages
- 263
I have a successfully working INSERT query called "tmpChangeOrders" that I am wanting to filter out some records before the insert that also exist in another table called "tmpJournalEntryChangeOrders". the below is not working and was wondering if someone might be so kind as to point me in the right direction?:
INSERT INTO tmpChangeOrders ( Store, Amount, ConcatenateBank, TransactionDate )
SELECT DISTINCT tmpBank.Store, tmpBank.Amount, [tmpBank].Store & " " & [tmpBank].Amount AS ConcatenateBank, Format([tmpBank.TransactionDate],"mm/dd/yy") AS TransactionDate
FROM tmpBankDebits LEFT JOIN tmpBank ON tmpBankDebits.[ConcatenateBankDebits] = tmpBank.ConcatenateBank
WHERE tmpChangeOrders.ConcatenateBank NOT IN (SELECT tmpJournalEntryChangeOrders.Concatenate);
INSERT INTO tmpChangeOrders ( Store, Amount, ConcatenateBank, TransactionDate )
SELECT DISTINCT tmpBank.Store, tmpBank.Amount, [tmpBank].Store & " " & [tmpBank].Amount AS ConcatenateBank, Format([tmpBank.TransactionDate],"mm/dd/yy") AS TransactionDate
FROM tmpBankDebits LEFT JOIN tmpBank ON tmpBankDebits.[ConcatenateBankDebits] = tmpBank.ConcatenateBank
WHERE tmpChangeOrders.ConcatenateBank NOT IN (SELECT tmpJournalEntryChangeOrders.Concatenate);