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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top