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 |
|
kapilarya
Yak Posting Veteran
86 Posts |
Posted - 2005-08-21 : 07:41:31
|
| is there any way by which i can crack from a text field to varchar where text field is storing more than 8000 characters and i want all the characters while cracking, it can be more than one varchar variable.Kapil Arya |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2005-08-25 : 09:56:47
|
| See if this helps you (to get first 8000 characters)Declare @v varchar(8000)Select @v=cast(textfield as varchar(8000)) from yourTableSelect @vBut I wonder if it is possible to get characters starts from 8001MadhivananFailing to plan is Planning to fail |
 |
|
|
Kristen
Test
22859 Posts |
Posted - 2005-08-25 : 10:32:16
|
| SUBSTRING ?Kristen |
 |
|
|
VladRUS.ca
Starting Member
23 Posts |
Posted - 2005-08-25 : 10:34:47
|
BOL: Maximum Capacity Specifications - Bytes per row = 8060 Check syscomments table and you will find how MS store text of big stored procedures in multiple rows |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2005-08-25 : 10:38:03
|
quote: Originally posted by Kristen SUBSTRING ?Kristen
WellTo use substring you need to convert it into varchar where you can have maximum length of 8000. So still you can access only first 8000 characters. Am I wrong?MadhivananFailing to plan is Planning to fail |
 |
|
|
Kristen
Test
22859 Posts |
Posted - 2005-08-25 : 11:04:40
|
"Am I wrong?"I believe so, but I thought that too until only the other day.SELECT SUBSTRING(MyTextColumn, 8001, 16000 8000) FROM MyTableshould work ...Kristen |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2005-08-26 : 01:09:21
|
| Thats coolI thought substring cannot be used directly without converting it to varchar so as in left or right. Thanks KristenMadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|