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

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -