Reading a text datatype field! HELP!

  • I have a table with a resume column of datatype text.

    I need to perform a select operation on this table so as to read the resumes of certain people.

    The value of this column is displayed as 'LongText'

    What conversion should I do? What function should I use to read text?

    I know of the ReadText statement.. Kindly let me know how exactly I should use this.

  • see SQL BOL for more information as well as example.

  • I did read it.. but when I use the exact same query on my db, it only says -so n so- number of rows affected. Doesn't show me anything though!

  • What client side tools are you using? Usually you can just select the column like any other.

  • I'm querying a remote database (at a different office site of the world) from Query Analyzer (SQL 2k).

  • If I was to create a table with a column of datatype text and insert it with records through Management Studio or Query Analyzer, it would allow me to do so.

    Also, if i perform a select operation on this particular table, I can read the text data.

    However, with the Resume column in my remote db, I have no clue how the records have been inserted as the fields apparently only store pointers to the data pages containing the actually text data.

    In this case, why can I not view the actual text data with a select operation?

    Like I said, I also used the TEXTPTR function to obtain the pointer to that column and then used the READTEXT feature to be able to view the data.

    Unfortunately, no luck on this.

    What other options do I have?

  • It will only show some pointer information in the Grid mode... you must be in the Text mode to see the data from a Text datatype.

    Best thing to do would be to copy it into a new table VARCHAR(MAX).

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

Viewing 7 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic. Login to reply