Reply to Varchar Truncation

Your name:

Reply:


Posted by Chris Moore on 01/26/07 15:16

Hello,

I am attempting to write a stored procedure that builds and executes a
dynamic SQL statement which can be up to 8000 characters long.
Therefore, I have declared a variable of type varchar(8000) which,
according to the documentation, is the maximum acceptable length of
such a variable. Unfortunately, however, SQL Server seems allow
varchars to only be half this size: the resulting string keepings
getting truncated to 4000 characters as reported by the len function.

Is there setting somewhere that would fix this behavior or some
work-around that I can employ that would allow me to execute a dynamic
sql statement that is longer than 4000 characters?

(note: I am not using the sp_executesql proc as it maxes out at 4000; I
am simply calling EXEC which, according to the docs, should be fine)

Thank You.

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация