update table

patd1
patd1 used Ask the Experts™
on
A. I have a crosswalk table with last name, first name, DOB, MemberID
B. I have a TempCrosswalk table with PersonID (Lastname+firstName+DOB), member ID

Some of the rows in crosswalk table have blank member ids, and I want to update those fromTempCrosswalk  

How do I do that?

Thanks You.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Top Expert 2010
Commented:
Assuming DOB is already [n][var]char...


UPDATE crosswalk
SET MemberID = t.[member ID]
FROM crosswalk c INNER JOIN
    TempCrosswalk t ON t.PersonID = c.[last name] + c.[first name] + c.DOB

Open in new window

Commented:
I suggest you create a primary key on you crosswalk c..

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial