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
 Transact-SQL (2000)
 Generate Record Serial No

Author  Topic 

krushnapanda
Starting Member

18 Posts

Posted - 2007-07-26 : 23:47:59
Hello Dear,
I have a sp that dispaly records from multiple tables.
now here how can i generate SERIAL NUMBER of records.
example:
slno field1 field2 field3
1 a b c
2 a b c
3 a b c
The slno field is not avail in any table , it should be generate automatic when sp is run
Thanks

Thanks

pbguy
Constraint Violating Yak Guru

319 Posts

Posted - 2007-07-27 : 00:39:32
create temporary table or table variable with slno as identity column and insert the result to this table and select the result from the new table as SP output.

--------------------------------------------------
S.Ahamed
Go to Top of Page
   

- Advertisement -