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
 General SQL Server Forums
 New to SQL Server Programming
 Text datatype

Author  Topic 

insanepaul
Posting Yak Master

178 Posts

Posted - 2009-05-11 : 09:12:46
I'm using sql 2005 and my requirements are to use a text datatype that holds more than 4000 characters. The information stored will be help manuals and in different languages.

I was thinking nvarchar(max) but max of 4000 characters. the nText datatype will hold more but I'm under the impression it has been deprecated. Can someone tell me what they would do, Cheers.

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2009-05-11 : 09:19:11
quote:
nvarchar(max) but max of 4000 characters


MAX is not 4000 but 2^31-1 bytes

see http://msdn.microsoft.com/en-us/library/ms178158(SQL.90).aspx


KH
[spoiler]Time is always against us[/spoiler]

Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2009-05-11 : 10:36:55
quote:
Originally posted by insanepaul

I'm using sql 2005 and my requirements are to use a text datatype that holds more than 4000 characters. The information stored will be help manuals and in different languages.

I was thinking nvarchar(max) but max of 4000 characters. the nText datatype will hold more but I'm under the impression it has been deprecated. Can someone tell me what they would do, Cheers.


if you're stating this from the fact that you get only part of string when you try to display the nvarchar(max) content, you need to change the sql mgmnt studio query editor options to make max length of characters shown in result pane to be a higher number ( the default is 256)
Go to Top of Page
   

- Advertisement -