I have the following query, I am using it to compare to tables in my database. I need to see if all the values of a field called dbaaudit are in another table'f field called F03_ACCT_N:--Check to see if all DBA names in MonetaryAudit are accounted for in FNMS_03declare @a_date as datetimeset @a_date = '04/19/2010'--insert into aciauditselect distinct 'DBA in Audit (Monetary) but missing from MDS (FNMS_03)',fnms03id,assoc,chain,mid,dbaaudit,0,0,dbaFNMS,'','',''from aciaudit_monetary left outer join aciboarding_fnms_03 on substring(f03_mid_nu,3,8) = midwhere (dbaaudit not in aciboarding_fnms_03) and (file_date = @a_date)
any help would be greatly appreciatedJon