Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2003

    Unanswered: query performance problem

    I am trying to run the undermentioned query. The matched deals table contains 8000 records and the internal delas table contains 15000 records
    What i want is to make a selection of the records that do exist in the matched deals table but do not exist in the internal deals table (a join can be made on ID 1 and trnnmb). The query i wrote is not incorrect but the performance is so poor that it takes acces over 15 minutes to produce the output. Is there a different way to do this??

    SELECT [matched deals].[ID 1]
    FROM [matched deals]
    WHERE ((([matched deals].[ID 1]) Not In (select [trnnmb] from [internal deals])));
    Nobody dies a virgin because life screws us all!

  2. #2
    Join Date
    Jun 2004
    Florida, US
    This should work for you:

    SELECT [matched deals].[ID 1]
    FROM [matched deals] LEFT JOIN [internal deals] ON [matched deals].[ID 1] = [internal deals].[trnnmb]
    WHERE ((([internal deals].[trnnmb]) Is Null));

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts