Results 1 to 3 of 3
  1. #1
    Join Date
    Sep 2012
    Posts
    5

    Unanswered: SQL Server Concatenation Issue

    Need to update one table with value of a column in another table plus a constant:

    UPDATE TABLE_A
    SET TABLE_A.COLA=TABLE_B.COLB+'10'
    FROM TABLE_A
    INNER JOIN TABLE_B
    ON TABLE_A.COLA=TABLE_B.COLA
    WHERE TABLE_A.COLA=TABLE_B.COLA

    The above statement works except the concatenated string has space between TABLE_B.COLB text and '10'. How to remove the space (4 characters) so that the string shows as one word 'TABLE_B.COLB10'? Thanks.

  2. #2
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    In theory, theory and practice are identical. In practice, theory and practice are unrelated.

  3. #3
    Join Date
    Sep 2012
    Posts
    5
    Quote Originally Posted by Pat Phelan View Post
    It works!! Thanks much!

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •