I have a table of posts from a forum, basically there is one row for the posting of a pdf file , then there is another row for the posting of the image url that goes with the pdf. So I took all the rows out of posts table and inserted them into Item table if they are a pdf. Now I have a column in Item table that I want to get filled with the row in the posts table that has the image basically I want
UPDATE Item i Set i.ImageUrl = p.guid
JOIN posts p ON i.old_id = p.parent_post
where p.PostType = 'image'
I have not been able to find a good example anywhere that is an Update that uses a join and has a WHERE clause , does anyone have any idea what I am doing wrong?