Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 String varchar variable length increase

Author  Topic 

cplusplus
Aged Yak Warrior

567 Posts

Posted - 2011-04-22 : 10:44:24
Is it possible.
I want to increase string @Sql variable size from varchar (8000) to 10000.

declare @Sql varchar(8000)

Than you very much for the helpful info.

robvolk
Most Valuable Yak

15732 Posts

Posted - 2011-04-22 : 10:46:16
You'll have to use varchar(max).
Go to Top of Page

cplusplus
Aged Yak Warrior

567 Posts

Posted - 2011-04-22 : 10:54:16
I used varchar max still it is not going over 8000 chars.
Go to Top of Page

robvolk
Most Valuable Yak

15732 Posts

Posted - 2011-04-22 : 10:56:34
It may not display more in the query results window because there's a limit per column. Check under Tools:Options:Query Results. Grid mode should return the full length but you'll have to copy and paste.
Go to Top of Page
   

- Advertisement -