Results 1 to 3 of 3
  1. #1
    Join Date
    Jul 2004
    Posts
    62

    Unanswered: Help: Finding not exists

    Dear all
    i have 2 tables users and logs. Logs keeps all the user logins; only when user logged in , it will be saved in this table.

    How do i find users that have not logged in certain days , example:
    Robert does not logged in on 24-JUL-2006.

    Table users
    userid
    name

    Table logs
    userid
    action_time

    Tq

  2. #2
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    Code:
    select users.name
      from users
    left outer
      join logs
        on logs.userid = users.userid
       and logs.action_time = '2006-07-24'
     where logs.userid is null
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  3. #3
    Join Date
    Jul 2004
    Posts
    62
    Thanks alot r937
    It works.

Posting Permissions

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