Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 2013
    Posts
    1

    Unanswered: show duplicated values?

    I have a big table :first few entries:

    NAME start stop model
    John 1234 3454 1
    Sam 1231 3454 2
    Tom 1034 2111 4
    Bob 1590 2123 5
    Tom 1234 4567 1
    Barbe 1234 1247 2
    jim 1034 3111 4

    I want to display all NAMES which have same start value


    required result :

    NAME start stop model
    John 1234 3454 1
    Tom 1234 4567 1
    Barbe 1234 1247 2
    Tom 1034 2111 4
    jim 1034 3111 4

    I basically want to display only the duplicated values?
    Is that possible?Please help
    Last edited by newbie_121; 03-14-13 at 00:34.

  2. #2
    Join Date
    Dec 2012
    Location
    Logan, Utah
    Posts
    163
    Try this:

    Code:
    Select n1.Name, n1.start, n1.stop, n1.model
      from  TestNames n1
     inner join
       (
         Select start
           from TestNames
          group by start
         having COUNT(*) > 1
       ) n2 on n2.start = n1.start
     order by n1.model, n1.stop

Posting Permissions

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