How To Read An TEXT Column Using T-SQL READTEXT Function



TODO:

Have you ever wanted to read an TEXT column from a Table in SQL Server

 

SOULTION:

 

DECLARE @Length int
DECLARE @ptrval varbinary(16)
		
SELECT @ptrval = TEXTPTR(MyTextColumn), @Length = Datalength(MyTextColumn) 
			FROM tbl_MyData where Id = 10023
			
READTEXT tbl_MyData.MyTextColumn @ptrval 0 @Length

 

 

NOTES:

There are no notes on this topic.



Add comment

  Country flag

biuquote
  • Comment
  • Preview
Loading