Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Array Parameters?
Message
 
 
À
19/12/2000 12:33:33
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Divers
Thread ID:
00455030
Message ID:
00455120
Vues:
35
>Transact SQL does not support arrays. Often, a temporary table is used to simulate an array where each row contains one element.
>
>-Mike

But then you have to go through the overhead of creating the temporary table and populating it with the 1 - 100 parameters. If you do this with 1 - 100 calls to a stored procedure, YECH!!

So you're kinda stuck with passing a long variable string for the SP to parse and create the temp table with it. But then why not have that as part of the original processing in the first place. Unless you have a generic need of creating "arrays" in many places.

FWIW, I just recently did this. Due to limitations of the current system (data stored in SQL Server, VFP and Access), I needed a way of passing SQL Server a lot of information it used to produce some aggregates. The SP parameter is set to varchar(8000) which when using integer value parameters, gives you approximately 1600 parameter options.
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform