Results 1 to 5 of 5

Thread: Select <>

  1. #1
    Join Date
    Dec 2005
    Posts
    266

    Unanswered: Select <>

    I am trying to find a way to get all the different value from 2 TABLE

    SELECT DISTINCT users.name FROM users INNER JOIN localisation
    ON users.name <> localisation.name
    WHERE users.name IS NOT NULL


    i need only all the DISTINCT users.name <> localisation.name

    i dont get it with INNER LEFT RIGH FULL JOIN


    thank you for helping
    Last edited by anselme; 12-07-06 at 11:03.

  2. #2
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    heh heh - you can run where you like - I'll still find you.

    Ok - what is wrong with this solution:
    http://www.dbforums.com/showpost.php...02&postcount=9

    or are you determined to used a left outer join?
    Testimonial:
    pootle flump
    ur codings are working excelent.

  3. #3
    Join Date
    Dec 2005
    Posts
    266
    with

    INSERT INTO Local (Numb, Name, Level)
    SELECT DISTINCT
    0
    , Name
    , 1
    FROM Users
    WHERE Name IS NOT NULL
    AND NOT EXISTS (SELECT NULL
    FROM Local
    WHERE Local.Name = Users.Name)


    it works perfectly

    thanks a ton pootle flump

  4. #4
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    Super.

    BTW - an FYI - I double checked my code here:
    http://www.dbforums.com/showthread.php?t=1612480
    It looks fine to me. Did you run it? If not then try it - you have two solutions to play with then.
    Testimonial:
    pootle flump
    ur codings are working excelent.

  5. #5
    Join Date
    Dec 2005
    Posts
    266
    yes I have run your code and it is exactly what i need


    thank you for your time pootle flump

Posting Permissions

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