Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Pull Row Number With Temp Temp
Message
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Titre:
Pull Row Number With Temp Temp
Divers
Thread ID:
01448734
Message ID:
01448734
Vues:
99
I'm working on this:
SELECT * 
	INTO #TmpContactInfo1
	FROM ContactInfo1

SET @NumberRecords = @@ROWCOUNT
SET @RowCount = 1

WHILE @RowCount <= @NumberRecords
BEGIN

	SELECT	Name = @Name,
			Company = @Company,
			Category = @Category
		FROM #TmpContactInfo1
		WHERE RowID = @RowCount

	SET @RowCount = @RowCount + 1
END

DROP TABLE #TmpContactInfo1
How do I get RowId as part of my result set?
Everything makes sense in someone's mind
public class SystemCrasher :ICrashable
In addition, an integer field is not for irrational people
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform