concantenate text type data

  • I would like to concantenate a column of type text with another column of type varchar. When I try

    t.ColVarchar + ' ' + t.ColText

    I get an error because I can't use "+" with a text field. Is there any way around this?

    Sam

  • try this

    t.ColVarchar + ' ' + convert(varchar,t.ColText)

     

  • thanks. that did it!

  • that only seemed to do it.  if you have text > 8k you will get truncation.

    Look in BOL for UPDATETEXT which will handle what you're actually asking for.

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

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