January 12, 2007 at 8:46 am
Hi all,
I've got two tables, staffdetails2 and staffdetails, each has 2 columns called distinguishedname and displayname, I'd like to set staffdetails2.distinguishedname to equal staffdetails.distinguishedname where staffdetails2.displayname = staffdetails2.displayname
All help appreciated,
JB
January 12, 2007 at 8:51 am
UPDATE t2
SET distinguishedname = t1.distinguishedname
FROM staffdetails t1 JOIN staffdetails2 t2
ON t1.displayname = t2.displayname
John
January 12, 2007 at 8:52 am
update sd2
set sd2.distinguishedname = sd.distinguishedname
from staffdetails2 sd2
inner join staffdetails sd
on sd2 = displayname = sd.displayname
January 12, 2007 at 9:34 am
Cheers guys!
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply