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)
 Row ID

Author  Topic 

SQL360
Starting Member

20 Posts

Posted - 2008-10-21 : 16:17:08
How to create a rowid that increments by (1,1) up to 31 rows in the local temp table inside the store procedure?

Once rowid is created can this local temp table be joined with another actual table in the database?

Thank you very much.

SQL360

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2008-10-21 : 16:20:28
create the rowid when creating the temp table.
yes it can be joined.

Webfred

Planning replaces chance by mistake
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2008-10-21 : 16:25:59
Use an IDENTITY column.



E 12°55'05.63"
N 56°04'39.26"
Go to Top of Page
   

- Advertisement -