Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2012 Forums
 Transact-SQL (2012)
 Assign consecutive numbers to rows from number 200

Author  Topic 

wecmas
Starting Member

2 Posts

Posted - 2014-07-15 : 18:19:24
How I can assign a consecutive number in several rows in a SQL query, but begin to list from number 200 onwards? for example ...

Thak you!

Bustaz Kool
Master Smack Fu Yak Hacker

1834 Posts

Posted - 2014-07-15 : 19:06:23
row_number() over(order by SomeColumnOrColumns) + 199



Too often we enjoy the comfort of opinion without the discomfort of thought. - John F. Kennedy
Go to Top of Page

wecmas
Starting Member

2 Posts

Posted - 2014-07-15 : 19:30:46
Thank you!
It works!


quote:
Originally posted by Bustaz Kool

row_number() over(order by SomeColumnOrColumns) + 199



Too often we enjoy the comfort of opinion without the discomfort of thought. - John F. Kennedy

Go to Top of Page
   

- Advertisement -