Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2005
    Posts
    46

    Unanswered: Lookup and match

    Hi

    On the look for a little help again

    I have two tables

    main:

    IP
    MAC
    PRINTER QUEUE
    SWITCH
    PORT

    mactables:
    MAC
    SWITCH
    PORT

    So far the main table contains IP address and there MACS and a PRINTER QUEUE name

    one IP address can be assigned to more than one queue

    Finally the on the mactables: I have a list of mac address assinged to ports

    I have managed to run a query at the moment where MAC mataches on both tables, but after the match I want to be able to copy the SWITCH and PORT number over to the main form.

    Any ideas on how to do this?

  2. #2
    Join Date
    May 2004
    Location
    New York State
    Posts
    1,178
    Code:
    UPDATE main INNER JOIN mactables On main.mac = mactables.mac; SET main.PORT = mactables.PORT, main.SWITCH = mactables.SWITCH;
    Hope this helps,

    Sam

Posting Permissions

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