I want to only show records in the first query that don't exist in the second query. However I am getting a syntax error 'missing operator'. I can't figure out where my syntax is off.
Code:
SELECT
[1 Sum with Unique Key].Key1, [1 Sum with Unique Key].Patient_Name, [1 Sum with Unique Key].Invoice_No, [1 Sum with Unique Key].Accession_No, [1 Sum with Unique Key].Procedure_Code, [1 Sum with Unique Key].Date_Of_Service, Sum([1 Sum with Unique Key].Charge_Amount) AS SumOfCharge_Amount
FROM [1 Sum with Unique Key]
GROUP BY [1 Sum with Unique Key].Key1, [1 Sum with Unique
Key].Patient_Name, [1 Sum with Unique Key].Invoice_No, [1 Sum with Unique Key].Accession_No, [1 Sum with Unique Key].Procedure_Code, [1 Sum with Unique Key].Date_Of_Service
WHERE [1 Sum with Unique Key].Invoice_No
NOT IN (SELECT [GRP-4-2008-2008-CHARGE-CORRECTIONS].INVOICE
FROM [GRP-4-2008-2008-CHARGE-CORRECTIONS]
GROUP BY [GRP-4-2008-2008-CHARGE-CORRECTIONS].INVOICE);