RE: ntext get content

RE: ntext get content

 

  

You're correct, the max display in QA is 8000.
You could read it in 8K chunks and display those in QA.

P

-----Original Message-----
From: Wu Haiyun
[mailto:mssqldba-ezmlmshield-x5357600.[Email address protected]
Sent: Tuesday, June 28, 2005 1:44 PM
To: LazyDBA Discussion
Subject: ntext get content


Hi,
is there anyway to get content of ntext column? i want to write a script
to do batch update for a table that has ntext column.

i tried the following:
select passage_id,datalength(passage_text) from custom_passages where
passage_id i=2322
-- 42796

DECLARE @ptrval varbinary(16)
SELECT @ptrval = TEXTPTR(passage_text)
FROM custom_passages
where passage_id=2322
READTEXT custom_passages.passage_text @ptrval 0 42796
GO

--error message
Server: Msg 7124, Level 16, State 1, Line 5
The offset and length specified in the READTEXT statement is greater
than the actual data length of 21398.


DECLARE @ptrval varbinary(16)
SELECT @ptrval = TEXTPTR(passage_text)
FROM custom_passages
where passage_id=2322
READTEXT custom_passages.passage_text @ptrval 0 21398
GO

-- didn't see all text, maybe query analyzer only allow me to see around
8000 characters.


Thanks,

Hwu


---------------------------------------------------------------------
TO REPLY TO EVERBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY
Website : http://www.LazyDBA.com
To unsubscribe: http://www.lazydba.com/unsubscribe.html

MS Sql Server LazyDBA home page