UPDATETEXT or WRITETEXT?

  • Hello,

    I searched the prior posts and scrutinized the BOL ... I still have some confusion.

    I am stuck with a database application that uses SS2k (no way of upgrading). A table the application uses has a field that is NVARCHAR(4000) ... stores non-Latin character sets ... that needs to be changed to NTEXT in order to store more character data. I understand my choices are UPDATETEXT and WRITETEXT.

    Q1: If I am completely replacing the contents of one field in one row, do I use UPDATETEXT or WRITETEXT?

    Q2: I am not having much luck getting UPDATETEXT to completely remove the old text and replace it with the new. Could someone show me the correct way to "replace all existing" text in the one field in the one row?

    Thanks ahead of time for any help you can provide!

  • Did you try simple UPDATE?

    _____________
    Code for TallyGenerator

  • BOL recommends that you don't use UPDATE with NTEXT since the field only holds a pointer to "out of row" data.

  • NTEXT can hold up to 2 Billion characters. The max number of bytes for a row in SS2K is 8060. SS2K stores the data in other places and only keeps a pointer in the field.

Viewing 4 posts - 1 through 3 (of 3 total)

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