Quantcast
Channel: 3 table update query
Viewing all articles
Browse latest Browse all 16

3 table update query

$
0
0

Hi,

Ok, so I have included the actually script that appears to work (with the actual tables / column names)! This is based on ramireddy's statement. With so many variations it's hard for me to tell if there is a 'best' way to achieve the required result. Some examples use "insert into select from" etc - others use joins... some of the joins resulted in the update of all records! but this last one looks good.

Any other feedback appreciated?

update

 

 

t
set owner= TT.newlogin
from
intranetnsops.dbo.rb_booking4 t
innerjoin intranet.dbo.members TM on t.owner= TM.logonname
inner join intranetnsops.dbo.tempmembersonemail TT on TT.employeenumber= TM.employeenumber

Viewing all articles
Browse latest Browse all 16

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>