millhouse123
Active Member
- Joined
- Aug 22, 2006
- Messages
- 335
I have a very simple query that joins two table and returns all records that are NULL in table 2
Table 1 = Automated
Table 2 = Conversion
The conversion is joined on Company, Account and Profit Center
What I would like to do is take the records that the query above returns and replace automated.profitcenter with 000000. So I would like the query then to return not only those that now join but those that still do not join. See example below
Code:
SELECT Automated.Company, Automated.Account, Automated.ProfitCenter, Automated.Amount, [TrialBalance].Amount, UserName
FROM (Automated
LEFT JOIN Conversion ON (Automated.Account=Conversion.[Mil Account]) AND (Automated.Company=Conversion.[Mil Company]) AND (Automated.ProfitCenter=Conversion.[MIL Profit Center]))
WHERE Conversion.[SAP Account] IS Null AND Conversion.[SAP Profit Center] is NULL AND Conversion.[SAP Company] is NULL;
Table 1 = Automated
Table 2 = Conversion
The conversion is joined on Company, Account and Profit Center
What I would like to do is take the records that the query above returns and replace automated.profitcenter with 000000. So I would like the query then to return not only those that now join but those that still do not join. See example below