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 2000 Forums
 SQL Server Development (2000)
 incremental sequential count

Author  Topic 

pizzojm
Starting Member

20 Posts

Posted - 2003-04-25 : 09:07:13
I am unloading a select statment to a file. I want hard code a row in the select statement that keep count of the row.

record_count other_varibles
1
2
.....

thanks

Page47
Master Smack Fu Yak Hacker

2878 Posts

Posted - 2003-04-25 : 09:23:13
How do you know which 'record_count' value goes with which row? Or does it not matter?


select
identity(int,1,1) as 'record_count',
other_variables
into
#pizzojm
from
pizzojm

select
record_count,
other_variables
from
#pizzojm
order by
record_count asc

 


Jay White
{0}
Go to Top of Page
   

- Advertisement -