Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10

    Unanswered: Selecting duplicates only

    I have tables as below

    Employees(EmployeeNum, Department, Division ... )
    Appr(UniqueID, EmployeeNum, ApprDate, ApprType ... )

    Where one employee can have many records in the Appr table.
    Basically, what I want is to pick out employees who have multiple records in the Appr table.

    Is this at all possible?
    Please ask any questions needed!

    - GeorgeV
    George
    Home | Blog

  2. #2
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    Code:
    select EmployeeNum
         , Department
         , Division
      from Employees 
     where EmployeeNum in
           ( select EmployeeNum
               from Appr
             group
                 by EmployeeNum
             having count(*) > 1 )
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  3. #3
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    Perfecto! <3
    George
    Home | Blog

Posting Permissions

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