DLookup Question

R

Raj

I am using DLookup to verify a field against in one database to another how
can I have my query pull only the fields that do not match? Is this possible
if so I would appricate any help that can be given..
Thanks

SELECT [business unit LOOKUP - BS Post].business_unit, [business unit LOOKUP
- BS Post].BU, [business unit LOOKUP - BS Post].circuitid, [business unit
LOOKUP - BS Post].customer_account, [business unit LOOKUP - BS Post].Item_ID
AS Expr1, CustomerGroupType.customergroup
FROM [business unit LOOKUP - BS Post] INNER JOIN CustomerGroupType ON
[business unit LOOKUP - BS Post].business_unit =
CustomerGroupType.customercode;
 
J

John Vinson

I am using DLookup to verify a field against in one database to another how
can I have my query pull only the fields that do not match? Is this possible
if so I would appricate any help that can be given..
Thanks

SELECT [business unit LOOKUP - BS Post].business_unit, [business unit LOOKUP
- BS Post].BU, [business unit LOOKUP - BS Post].circuitid, [business unit
LOOKUP - BS Post].customer_account, [business unit LOOKUP - BS Post].Item_ID
AS Expr1, CustomerGroupType.customergroup
FROM [business unit LOOKUP - BS Post] INNER JOIN CustomerGroupType ON
[business unit LOOKUP - BS Post].business_unit =
CustomerGroupType.customercode;

I don't understand, Raj. This query does not use DLookUp. What do you
mean by "pull the fields that do not match"? Do you want records from
[Business unit LOOKUP - BS Post] which do not have a matching
customercode? If so, change the INNER JOIN to LEFT JOIN and add a
crieterion

WHERE CustomerGroupType.customercode IS NULL

John W. Vinson[MVP]
Join the online Access Chats
Tuesday 11am EDT - Thursday 3:30pm EDT
http://community.compuserve.com/msdevapps
 
Top