Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Passing Multiple Values to a Single Parameter?
Message
 
 
À
21/09/2004 02:06:42
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Stored procedures, Triggers, UDFs
Divers
Thread ID:
00943913
Message ID:
00944611
Vues:
21
This message has been marked as a message which has helped to the initial question of the thread.
Try
xValue='''Apples'', ''Bananas'', ''Coconuts'''
>Thanx! for the reply. Actually I'm not familiar with XML. I think I'll need to do some research on that. But I was curious about the 3rd option: The Dynamic SQL.
>
>DECLARE @Sql nvarchar(4000)
>SET @Sql = 'SELECT ... WHERE column in (' + @ListParam + ')'
>EXECUTE(@Sql)
>
>This is exactly what I'm trying to accomplish but I seem to be having problems with the @ListParam.
>
>xValue="'Apples', 'Bananas', 'Coconuts'"
>
>This is how I've assigned the values to the variable, which I pass to the stored procedure. When I pass this variable to the stored procedure, it reads them separately and I get the error message that I passed too many parameter values.
>
>Is there something wrong with what I'm doing?
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform