check that column has one and only one value and the value is the value I want

  • Using SQL Server 2012 function in use

    select * from

    (

    select

    *,CUME_DIST () OVER (PARTITION BY marker ORDER BY val)-

    RANK() OVER (PARTITION BY marker ORDER BY val ) AS PctRank

    from

    #Temp t

    )T1 where PctRank=0

    --------------------------------------------------------------------------------------------------
    I am just an another naive wannabe DBA trying to learn SQL Server

Viewing post 16 (of 15 total)

You must be logged in to reply to this topic. Login to reply