• The Dense_rank is perfect. It allowed me to run it against all my columns. I even replaced my Row_number with it.

    SELECT t.TransactionId, dense_rank() over (order by T.TransactionID) as TXKey,

    t.FacilityAccountID, dense_rank() over (order by t.FacilityAccountID) as FAKey,

    T.attendingProvider, dense_rank() over (order by t.attendingProvider) as AttPrvKey,

    T.ReferringProvider, dense_rank() over (order by t.ReferringProvider) as RefPrvKey,

    t.PostDate

    from Transactions T

    Is there a reason to use Row_number instead of dense_rank on the first column. It appears dense_rank did the same thing.