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.
| Author |
Topic |
|
dnf999
Constraint Violating Yak Guru
253 Posts |
Posted - 2007-01-30 : 11:29:44
|
| Hi I have an extremely large field (up to 250,000 characters long). (counted using Access)I need to find out the Max length of this field in SQL, or change the datatype to varchar(max)Any ideas?Thanks |
|
|
harsh_athalye
Master Smack Fu Yak Hacker
5581 Posts |
Posted - 2007-01-30 : 11:33:12
|
| [code]select max(datalength(col1)) from Tbl[/code]Harsh AthalyeIndia."The IMPOSSIBLE is often UNTRIED" |
 |
|
|
dnf999
Constraint Violating Yak Guru
253 Posts |
Posted - 2007-01-30 : 11:53:39
|
| Many thanksIs there anyway i can change the data type ntext to varchar(Max)?Thanks |
 |
|
|
jezemine
Master Smack Fu Yak Hacker
2886 Posts |
Posted - 2007-01-30 : 14:24:15
|
see alter table syntax in BOL:http://msdn2.microsoft.com/en-us/library/ms190273.aspxfrom BOL:quote: The data type of text, ntext and image columns can be changed only in the following ways: * text to varchar(max), nvarchar(max), or xml * ntext to varchar(max), nvarchar(max), or xml * image to varbinary(max)
www.elsasoft.org |
 |
|
|
|
|
|