• This is another way of doing it...and I guess the simplest way....:-)

    With YOURTABLE (TICKET,STATUS)

    AS

    (

    SELECT 9543,1 UNION ALL

    SELECT 9543,5 UNION ALL

    SELECT 9543,5 UNION ALL

    SELECT 9544,1 UNION ALL

    SELECT 9546,1 UNION ALL

    SELECT 9547,1 UNION ALL

    SELECT 9547,5

    )

    Select * From YOURTABLE

    Where TICKET NOT IN (Select TICKET From YOURTABLE Where STATUS = 5)

    GO

    Vinu Vijayan

    For better and faster solutions please check..."How to post data/code on a forum to get the best help" - Jeff Moden[/url] 😉