query not working

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

SELECT DISTINCT Left([COSTS].[Account],4) AS TEST, costs.Amount
FROM [L-LINE-ITEMS], costs
WHERE (((Left([COSTS].[Account],4)) Not In (SELECT [L-LINE-ITEMS].
Code:
FROM [L-LINE-ITEMS])));

Does not return any records even thougth there are records in table "costs"
that are not in "L-LINE-ITEMS"?  What am I doing?  Or not?

Thanks
 
hi,
if you are trying to write a "not in" query, you are way
off the mark.
in the database window-query tab click the new button.
there is a 'find unmatch query wizard'. build the query in
design mode then look at the sql.
you will have to join both tables and switch "not in"
to "is null".
good luck.
 
Back
Top