Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Monster select
Message
De
20/11/2001 11:10:26
 
 
À
20/11/2001 10:23:57
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Stored procedures, Triggers, UDFs
Titre:
Divers
Thread ID:
00583822
Message ID:
00583964
Vues:
22
>It's really hard to explain.
>Hope the example helps

I think I understand but my solution still holds. You can still combine multiple variables when you go to execute the query. You'll just have to be creative when it comes to building the string.

DECLARE @cmd1 nvarchar(4000), @cmd2 nvarchar(4000), @cmd3 nvarchar(3000)
DECLARE @worker nvarchar(4000), @cntr int

SET @cntr = 1

DO WHILE (something)
BEGIN
SET @worker = @worker + {new part of the query}

IF (len(@worker) > 3500)
BEGIN
IF @cntr = 1 SET @cmd1 = @worker
IF @cntr = 2 SET @cmd2 = @worker
IF @cntr = 3 SET @cmd3 = @worker
SET @worker = ''
END
...
END

EXECUTE (@cmd1 + @cmd2 + @cmd3)

Or something similar.

-Mike
Michael Levy
MCSD, MCDBA
ma_levy@hotmail.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform