Example update with left outer join in SQL Server


I always seem to remember the access syntax for this rather than the sql server version–

update
    hachette_digitalideas_import
set
    harrietId = u.Id
from
    hachette_digitalideas_import h
    left outer join user_group u
        ON (h.email = u.email or h.[full name] = u.name) AND u.btype = 'u'

As opposed to the following in access;

update
    hachette_digitalideas_import
    left outer join user_group u
        ON (h.email = u.email or h.[full name] = u.name) AND u.btype = 'u'
set
    harrietId = u.Id

Related posts:

  1. No comments yet.
(will not be published)
  1. No trackbacks yet.