Results 1 to 1 of 1
  1. #1
    Join Date
    Dec 2006

    Question Unanswered: Update query not working or super slow?

    I am trying to make an update query but have some performance issues...

    I need to compare a folder with pictures to an excel file, to see if the
    pictures exist in the excell file when they exist in the folder...
    I want to create 3 different things:
    1 - The image exist in the folder but not in the excel file (add txt: Add
    2 - The picture exist in both (add txt: Good)
    3- Picture does not exist in the folder (add txt: No Picture)..

    What I have done so far:
    I have send the DIR command to a txt file and imported this into MS-Access,
    removing the extentions, leaving only the names. Since all names are product
    numbers it will result in the following: 123456.jpg --> 123456
    I have called this table PDrive with the fields ID (autonumber) and Field1

    Then I imported the Excell file that was exported from our software into a
    table called RugMan, with the fields: ID (autonumber), Number (number),
    Imagefile (number) and Test (text)

    Now I need to compare Field1 with ImageFile.. They both are modified to only
    have numers, so it should be easy right?

    My queries:
    1- Add Image
    UPDATE PDrive, RugMan SET RugMan.Test = "Add Image"
    WHERE ((([RugMan]![Number])=[PDrive]![Field1]) AND

    This one works great, no problems

    2- Good
    UPDATE PDrive, RugMan SET RugMan.Test = "GOOD"
    WHERE ((([RugMan]![Number])=[PDrive]![Field1]) AND

    Also works without any problems.

    3-No Picture
    UPDATE PDrive, RugMan SET RugMan.Test = 'No Pic'
    WHERE ((([RugMan]![Number]) Not In (SELECT [PDrive]![Field1] FROM PDrive )));

    Here is the PROBLEM... This query I can let run for hours, but it never
    seems to finish...

    Anyone has any idea why and what the solution to this is?

    For those who like to have a closer look, I included the database...
    Attached Files Attached Files
    Last edited by flipandboef; 08-14-07 at 17:38. Reason: added database..

Posting Permissions

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