Results 1 to 3 of 3

Thread: Help with SQL

  1. #1
    Join Date
    Jun 2004
    Posts
    23

    Exclamation Unanswered: Help with SQL

    Take a look at my SQL..

    Code:
    SELECT Users.User_ID, Users.User_MAC, Users.Signal_Strength, Users.Noise, Users.Signal_To_Noise, Users.Throughput
    FROM Users, Valid_Users
    WHERE Users.User_MAC<>Valid_Users.Valid_MAC
    GROUP BY Users.User_ID, Users.User_MAC, Users.Signal_Strength, Users.Noise, Users.Signal_To_Noise, Users.Throughput
    I have a Valid_Users table and a Users table.
    I have all the values in the Users table and all the values of a valid user in the Valid_Users table.

    I then use Query to find the intruder, meaning, I want it to compare the Users table with the Valid_User table and insert whichever values not found in the Valid_MAC field of the Valid_Users table into the Query qryIntruders.

    The code above insert everything from the Users table into the qryIntruders!!! Someone help me get only those values not found in the Valid_Users.Valid_MAC!!
    Attached Thumbnails Attached Thumbnails tables1.JPG  

  2. #2
    Join Date
    Jan 2004
    Location
    Aberdeen, Scotland
    Posts
    1,067
    hi adiboy

    you could use something like this

    Code:
    SELECT Users.User_ID, Users.User_MAC, Users.Signal_Strength, Users.Noise, Users.Signal_To_Noise, Users.Throughput
    FROM Users
    WHERE Users.User_MAC Not In (SELECT Valid_Users.Valid_MAC FROM Valid Users);
    HTH
    Dave

  3. #3
    Join Date
    Mar 2004
    Posts
    128

    SQL query

    Hi,
    You can use the inner join statment:
    SELECT Users.User_ID, Users.User_MAC, Users.Signal_Strength, Users.Noise, Users.Signal_To_Noise, Users.Throughput
    FROM Users inner join Valid_Users on (Users.User_ID=Valid_Users.User_ID ) and
    (Users.User_MAC <> Valid_Users.Valid_MAC )

    I hope I helps

Posting Permissions

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