Access 2000 Question

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • High_Jumbllama
    Super MURCer
    • Dec 1999
    • 4522

    #1

    Access 2000 Question

    I am having trouble making a query.
    I want the resulting rows to only appear if the phone number on the row does not appear in another table.

    Table Main contains all kinds of info including name and phone number.
    Table Used contains a list of phone numbers.

    To reiterate:
    I want the rows from the "Main" table to appear in the query only if the phone number of that row does not appear in the "Used" table.

    I have Access 2000 for Dummies, a pocket Guide to access and a few internet sites that I have been looking at. For some reason my brain is not figuring this out. The DCount and DLookup functions seem promising but I am not understanding the syntax.
  • mdhome
    MURCer
    • Apr 2000
    • 842

    #2
    you will need to enter the following in SQL view

    select * from main where phone not in (select phone from used)




    there may be a more elegant way of doing this but this is simple and does work

    Regards MD
    Interests include:
    Computing, Reading, Pubs, Restuarants, Pubs, Curries, More Pubs and more Curries

    Comment

    • High_Jumbllama
      Super MURCer
      • Dec 1999
      • 4522

      #3
      Many thanks. I knew it had to be relatively simple.

      Comment

      • High_Jumbllama
        Super MURCer
        • Dec 1999
        • 4522

        #4
        Arrrggghhh!

        Just wasted a couple of hours because there was a row with a NULL text string as an entry in the phone table. Aaarrrggghhh! I couldn't figure out why no returns were being returned and it was taking several minutes per query. (~30000 items being checked against 2500 items with the

        Comment

        Working...