+ Reply to Thread
Results 1 to 3 of 3

Multiple Query of Access Database

  1. #1
    Registered User
    Join Date
    05-14-2005
    Posts
    2

    Multiple Query of Access Database

    Hi

    From my web site statistics, I have imported into Excel 2000 a (large) list of unresolved IP numbers (ie converted from their IP addresses into one number) for which I want to find out the country they came from.

    I also have a csv type file with each record having the starting and ending IP number and the country which applies to this block of IP numbers. I imported this file into an Access 2000 database.

    I cannot work out how in Excel to query the Access database and return the country value for each IP number in turn.

    In other words, I have the IP numbers in (say) rows A1 to A100 and I would like their country names to be resolved into the corresponding rows B1 to B100.

    I have used Excel a fair bit but this is my first attempt at SQL/Query etc. I have some acquaintance with Access.

    I would appreciate some help on this.

    Thanks
    Peter

  2. #2
    Forum Expert
    Join Date
    12-24-2004
    Location
    Sweden
    Posts
    1,256
    Have you tried the menu: Data>Import External Data>...
    The Web Query can import Html tables, such as a statistics tables

    Ola Sandström


    ... or did you mean...
    A2:A100 : Ip-adresses (I have this imported from my homepage statistics file)
    B2:B100 : What is the Query to access my Access database for corresponding Country codes?
    Last edited by olasa; 05-14-2005 at 07:23 AM.

  3. #3
    Registered User
    Join Date
    05-14-2005
    Posts
    2
    Hi

    Maybe an example might help.

    My Access database has entried looking like:
    Starting IP Ending IP
    Number Number Country

    3579242752 3579243007 United States
    3579243008 3579248639 United Kingdom
    3579248640 3579314175 Russian Federation

    (Note: I am not sure that in real life the starting IP number will always be one more than the previous ending IP number.
    Hence I don't see how I can use VLOOKUP. In addition the IP number / Country table has more than the 64,000 row maximum that Excel 2000 allows me.)

    My Excel source data of IP numbers based on my web statistics looks like:

    3579242900
    3579243000
    3579248000
    3579313000
    etc

    What I am after is a result in Excel that looks like
    Column A Column B

    Row 1 3579242900 United States
    Row 2 3579243000 United States
    Row 3 3579248000 United Kingdom
    Row 4 3579313000 Russian Federation
    etc

    Thus I want to first query Access using the Excel value of 3579242900. The query will find that 3579242900 is between 3579242752 and 3579243007 and so return a value of United States.

    Next I want to query Access again using the Excel value of 3579243000. The query will find that 3579243000 is between 3579242752 and 3579243007 and so return a value of United States.

    The third query of Access will use the Excel value of 3579248000. The query will find that 3579248000 is between 3579243008 and 3579248639 and so return a value of United Kingdom.

    etc

    Thanks
    Peter

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1