sql - Update column from inner join -
this question has answer here:
- update table using join in sql server? 9 answers
i have table of posts forum, there 1 row posting of pdf file , there row posting of image url goes pdf. took rows out of posts table , inserted them item table if pdf. have column in item table want filled row in posts table has image want
update item set i.imageurl = p.guid join posts p on i.old_id = p.parent_post p.posttype = 'image'
i have not been able find example anywhere update uses join , has clause , have idea doing wrong?
the correct syntax in sql server looks more this:
update set imageurl = p.guid item join posts p on i.old_id = p.parent_post p.posttype = 'image';
Comments
Post a Comment