Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 2009
    Posts
    62

    Unanswered: Re-Order Integer field

    Hi,

    i have the following data:

    Account Seq
    123 1
    123 3
    123 4
    456 1
    456 1
    456 2

    what i need to do is re-order the Seq column to remove any gaps or duplicates.

    I need the above to be like this:
    Account Seq
    123 1
    123 2
    123 3
    456 1
    456 2
    456 3

    Any ideas??

    thanks
    scott

  2. #2
    Join Date
    Jan 2003
    Location
    Massachusetts
    Posts
    5,799
    Provided Answers: 11
    Have a look at the Row_Number() function.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •