Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Passing Multiple Values to a Single Parameter?
Message
 
 
À
21/09/2004 20:56:15
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Stored procedures, Triggers, UDFs
Divers
Thread ID:
00943913
Message ID:
00944819
Vues:
27
This message has been marked as the solution to the initial question of the thread.
Try
CREATE PROCEDURE My1stSProc
@ListParam AS varchar(100)
AS
DECLARE @Sql nvarchar(4000)
SET @Sql = 'SELECT ItemID, ItemDesc  FROM dbo.ItemMaster' + 
  ' WHERE ItemID IN (' + @ListParam + ')' 
EXECUTE(@Sql)
>CREATE PROCEDURE My1stSProc
>@List char(100)
>as
>
>SELECT ItemID, ItemDesc
>FROM dbo.ItemMaster
>Where ItemID in (@List)
>GO
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform