P0039 – Creating a Row Number For A Result Set

BIDA Forums Forums Technical Topics 2-Databases 2-SQL Server P0039 – Creating a Row Number For A Result Set

Viewing 0 reply threads
  • Author
    Posts
    • #1123
      Peter Jones
      Keymaster

        Just for those who want to know.

        One way we have come up with to create sequential row number is to use current user as the partitioning column.

        This is how we have done it.

        
        select  row_number() over (partition by CURRENT_USER order by CURRENT_USER )   sequential_row_count_column
        

        Best Regards
        Peter Jones

    Viewing 0 reply threads
    • You must be logged in to reply to this topic.