SQL Server Performance

Text datatype

Discussion in 'T-SQL Performance Tuning for Developers' started by cb, Mar 12, 2003.

  1. cb New Member

    Hi 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.
  2. satya Moderator

    The best option to refer to books online for READTEXT/WRITETEXT/UPDATTEXT topics which has covered required information.

    Satya SKJ
  3. cb New Member

    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.
  4. satya Moderator

    I feel if you look thoroughly under BOL you can find the solution.

    USE pubs
    GO
    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
    GO

    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


    Satya SKJ

Share This Page