Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Very big EXECUTE() line
Message
 
 
À
22/03/2011 16:44:53
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Scripting
Versions des environnements
SQL Server:
SQL Server 2008
Application:
Web
Divers
Thread ID:
01504574
Message ID:
01504575
Vues:
38
>I have an EXECUTE() line which executes the content of a variable. The variable string has 4563 characters. However, if I use this declaration:
>
>
>DECLARE @SQL nvarchar(max)
>
>
>...it is not big enough.
>
>I can go higher with this declaration:
>
>
>DECLARE @SQL nvarchar(4000)
>
>
>But, it is still not big enough.
>
>Any idea on the proper declaration to host such a big string?

nvarchar(max) should be enough. You may be falling into some trap here when you concatenate mulitple strings into one. Are you using PRINT to see the output? If so, it's limited to 8000 characters.
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform