I have two tables, one named issue and the other named activ in SQL Server 2008. I am deleting a column in issue, but before I do so, I want to find the corresponding column in activ, and update a field. I'm just not sure how to reference activ.
issue
iissueid, iactivid, ...
activ
iactivid, rtfnotes, ...
UPDATE activ
SET activ.rtfnotes = NULL
FROM issue
JOIN activ.iactivid = issue.iactivid
WHERE issue.iissueid = @tID
DELETE issue WHERE iissueid = @tID
Could someone point out where I am going wrong. I'm pretty sure I am almost there.