I have created a temp file with all the agency_id that are in a policy file.. There are a lot more ageny_id in the agency file. Now I need to see which of the agency_id in the agency file are not in my temp file..
SELECT DISTINCT AGENCY_ID INTO #TEMP1
FROM POLICY WHERE POLICY_NUMBER NOT LIKE '%Q%' AND AGENCY_ID IS NOT NULL ORDER BY AGENCY_ID