October 21, 2008 at 2:20 pm
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.
October 21, 2008 at 2:51 pm
Identity columns in TempTables or MemoryTables work as expected:
either :
Create Table #myTempTable(
RowID int identity(1,1),
otherRowsFollow nvarchar(100)
)
or:
Select
Identity(int,1,1) as RowID,
otherRowsFollow
into #myTempTable
From anExistingTable
Where...
with MemoryTables:
Declare @myMemoryTable Table (
RowID int identity(1,1),
otherRowsFollow nvarchar(100)
)
But what do mean by joining with an existing Table ?
Do mean JOIN or MERGE ?
devloping robust and performant databaseapplications with Microsoft SQL-Server
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply