hello: I want find that the ntext column data string have more than 2000 characters. I need to truncate those string to segment with 200 character, then put those segments along with their table_name and column_name to another table. Maybe need to use cursor? If so, how to use it? Your help is highly appreciated.
Can you simulate this logic? declare @t table(n ntext) insert into @t select 'this is test string' select substring(n,number*5-5,5) from @t t join master..spt_values m on m.number<datalength(t.n) where type='p' and substring(n,number*5-5,5) >''