SQL Server 2008 update query not working -


i need update image_id in user_group table value of image_id2 in view_kantech_images names match.

my query returning error:

update user_group set image_id = (select vkm.image_id2                  view_kantech_matched vkm                  vkm.name user_group.name) name = view_kantech_matched.name 

the error returns is:

msg 4104, level 16, state 1, line 1
multi-part identifier "view_kantech_matched.name" not bound.

you use update-join syntax instead:

update ug set    ug.image_id = vkm.image_id2   user_group ug join   view_kantech_matched vkm  on vkm.name = ug.name 

Comments

Popular posts from this blog

twig - Using Twigbridge in a Laravel 5.1 Package -

firemonkey - How do I make a beep sound in Android using Delphi and the API? -

jdbc - Not able to establish database connection in eclipse -