all groups > sql server new users > march 2005 >
You're in the

sql server new users

group:

add "order" col in query?


add "order" col in query? r
3/31/2005 9:52:36 AM
sql server new users:
How can I create a column in a query that simply creates an number listing
the order of the rows? Row 1 would contain 1, 2 would contain 2, etc. I
need to sort a table based on a bunch of fields and then "rank" the results.

Thanks.


Re: add "order" col in query? Rohtash Kapoor
3/31/2005 10:16:08 AM
Checkout the following link:

How to dynamically number rows in a SELECT Statement
http://support.microsoft.com/?kbid=186133

---
Rohtash Kapoor
http://www.sqlmantra.com



[quoted text, click to view]

Re: add "order" col in query? r
3/31/2005 10:38:05 AM
exactly what I was looking for - thanks!

[quoted text, click to view]

AddThis Social Bookmark Button