I want to append data to a field in Issues.Comments from table Comments_Upload but I need to append the comments from c.Comments to any existing value in Issues.Comments and not just overwrite it. My code does not work when there is no existing value in i.Comments. How do I just update i.Comments with c.Comments if there is no existing value in i.Comments?
UPDATE i
SET
--This works to overwrite the value for comments which is not what I want
i.Comments = c.Comments
--This is what I want but it works only when there is already a value for i.Comments
i.Comments = i.Comments + ' ' + c.Comments
FROM
Issues i
INNER JOIN Comments_Upload c ON i.IssueID = c.IssueID
WHERE
i.IssueID = 112