How do I concat the letter ''A'' to the start of every string that is found in a column?

  • How do I concat the letter 'A' to the start of every string that is found in a column?

  • T-SQL string concatenation simply uses the '+' operator.

    SELECT 'A' + YourColumnName

    FROM YourTableName

     

  • Can I put that in an UPDATE statement?

     

    Update:  Sorry .... I can .... I need to go to bed I think.

  • update mytable

    set myfield = 'A' + myfield

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

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