Home Forums SQL Server 7,2000 T-SQL Row_number() over (partition by ....order by) RE: Row_number() over (partition by ....order by)

  • To get you started - the row_number() function will return a sequence of numbers starting at 1 effectively allocating a number to each EMAIL_ID in EMAIL_ID order. The sequence restarts at 1 for each (PersonID, Department) combination.

    The join allows the number generated by the row_number() function to be set up as the EMAIL_NO in tblEMAIL.

    --------------------------------------------------------------

    “Doubt is not a pleasant condition, but certainty is absurd.” Voltaire