|
|
|
Grasshopper
      
Group: General Forum Members
Last Login: Thursday, April 25, 2013 11:34 PM
Points: 13,
Visits: 111
|
|
Hello,
It is possible to use dense_rank() function such that rank to begin with a specified ID ?
Thank you.
G.
|
|
|
|
|
SSChampion
        
Group: General Forum Members
Last Login: Today @ 10:16 AM
Points: 11,638,
Visits: 27,722
|
|
dense_rank, like all the windowing functions like row_number,ntile and rank all start with one, so just add your some number to it to get your starting number
select dense_rank() over (order by object_id) + 428600 As Val, * from sys.columns
Lowell
--There is no spoon, and there's no default ORDER BY in sql server either. Actually, Common Sense is so rare, it should be considered a Superpower. --my son
|
|
|
|
|
Grasshopper
      
Group: General Forum Members
Last Login: Thursday, April 25, 2013 11:34 PM
Points: 13,
Visits: 111
|
|
|
|
|