Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Attempt at a general counting SP
Message
 
À
Tous
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Stored procedures, Triggers, UDFs
Titre:
Attempt at a general counting SP
Divers
Thread ID:
00758191
Message ID:
00758191
Vues:
64
I'm trying to create a SP that can return a count of rows for a specified table, column and column value. I get an error that states "Must declare the variable @tcTable".

Any ideas?

Doug

Here's the SP ...

CREATE PROCEDURE get_count @tcTable varchar(30), @tcColumn varchar(30), @tnValue integer AS

declare @nCount integer

select @nCount = count(*) from @cTable where @tcColumn = @tnValue

RETURN @nCount
GO
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform