locked
Append data to a column RRS feed

  • Question

  • I want to have a column in my table where we can append data to it without affecting the existing data. I have tried this using a column of text data type. since text is a LOB i am a bit concerned about the storage. Is there a better way to get this done? thanks in advance for your help.
    Tuesday, July 24, 2007 3:37 PM

Answers

  • use an (n)varchar(max) datatype. The LOB's are being depreciated in a future release.

     

    Code Snippet

    INSERT INTO table (id, value)

    SELECT v.id, v.value + @value

    FROM table v

    WHERE v.id = @id

     

     

    Tuesday, July 24, 2007 5:11 PM

All replies

  • use an (n)varchar(max) datatype. The LOB's are being depreciated in a future release.

     

    Code Snippet

    INSERT INTO table (id, value)

    SELECT v.id, v.value + @value

    FROM table v

    WHERE v.id = @id

     

     

    Tuesday, July 24, 2007 5:11 PM
  • Hi Cam,

     

    Thanks for your reply...

     

    I didn't understand the query you have replied.

     

    Can you help me with another query

    Wednesday, July 25, 2007 7:21 AM