• my version:

    note how i provided ready to paste-and-test code for the table and sample data?

    if you can do the same in the future, you will get much better, tested answers.

    With YourTable ([Server],[AppID])

    AS

    (

    SELECT 'AAABBB','1000' UNION ALL

    SELECT 'AAABBB','1005' UNION ALL

    SELECT 'ASFQRE','1001' UNION ALL

    SELECT 'AGSFSD','1002' UNION ALL

    SELECT 'CCCDDD','1003' UNION ALL

    SELECT 'CCCDDD','1009'

    )

    SELECT T1.*

    FROM YourTable T1

    INNER JOIN (

    SELECT

    [Server]

    FROM YourTable

    GROUP BY [Server]

    HAVING COUNT(*) > 1

    ) T2

    ON T1.[Server] = T2.[Server]

    ORDER BY

    T1.[Server],

    T1.[AppID]

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!