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 2000 Forums
 SQL Server Development (2000)
 Text datatype, when it is more than 8000 chars, CharIndex function fails

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2004-09-17 : 08:27:15
Bhuvana writes "I am having on Text Variable as input param for a SP.

While I am trying to split it by a row separator '~', and finding charindex, it returs zero, when it is more than 8000 chars.

What to do in this situation?

Thanks in advance,
Bhuvana Sridhar"

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2004-09-17 : 10:21:52
split the text into chunks of 8000 and process those:
select substring(textCol, 0, 8000), substring(textCol, 8000, 8000), substring(textCol, 16000, 8000),...
from MyTable


Go with the flow & have fun! Else fight the flow
Go to Top of Page
   

- Advertisement -