SQL Server Performance Forum – Threads Archive
Text datatypeHi Forum I am back with set of questions.
I am having trouble reading values from a column which is text datatype. Could somebody help me to get the required values in readable format. Thanks in advance.
The best option to refer to books online for READTEXT/WRITETEXT/UPDATTEXT topics which has covered required information. Satya SKJ
quote:Originally posted by satya The best option to refer to books online for READTEXT/WRITETEXT/UPDATTEXT topics which has covered required information. Satya SKJ
I am looking for a solution not a reference. I know somewhere it might be mentioned in books online, I am aware it is in books online. Its hard to spare time reading such material which is good for nothing sometimes. Try to give straight solution. Could somebody have solution for my question.
I feel if you look thoroughly under BOL you can find the solution.
DECLARE @ptrval varbinary(16)
SELECT @ptrval = TEXTPTR(pr_info)
FROM pub_info pr INNER JOIN publishers p
ON pr.pub_id = p.pub_id
AND p.pub_name = ‘New Moon Books’
READTEXT pub_info.pr_info @ptrval 1 25
This provides the data from second to 26th character in the column. Not always possible to give detailed explanation to your question, for which you have to spare time at the referred topics. Kindly adhere to the forum policies and avoid publisizing your feelings. HTH