May 6, 2004 at 12:59 pm
Is there anyway to produce a row number, similar to an IDENITY (1,1) column in a select statement without creating the identity in the table or using a temp table?
Something like
SELECT <row number>, * from authors
If there is how do I code <row number>?
May 6, 2004 at 1:06 pm
There is no row number functionality in SQL Server (at least at this time). However you could try using a Subquery to order the data and produce the count of those less than the ordered on field but of course if the items are not unique then you will get duplicate numbers.
May 6, 2004 at 1:26 pm
Could you give me an example of the subquery?
May 6, 2004 at 1:54 pm
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply