开发者

adding text from a column into an existing column without overwriting

开发者 https://www.devze.com 2023-03-23 02:42 出处:网络
How do I take the information from 1 column/field in a table and add it开发者_运维百科 to another field in a different table without overwriting what is in there?

How do I take the information from 1 column/field in a table and add it开发者_运维百科 to another field in a different table without overwriting what is in there?

Example:

From: Table 1

client.notes

To: Table 2

Add client.notes to the item.description (but not overwrite what is already in the item description field)


Something like this

UPDATE ITEM SET Description = Description + Notes
FROM ITEM
  JOIN Client on Client.Column = ITEM.column
WHERE Condition = TRUE

MSDN article on + String Concatenation http://msdn.microsoft.com/en-us/library/ms177561.aspx

MSDN Article on SUBSTRING which you may find useful as well http://msdn.microsoft.com/en-us/library/ms187748.aspx

0

精彩评论

暂无评论...
验证码 换一张
取 消