开发者

adding text from a column into an existing column without overwriting

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜