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

3 table update query

$
0
0

Update Database1.dbo.table2 

Set OldLogon = (Select db1.newLogon from Database1.dbo.Table1 As db1 Where db1.id = (Select db2.id From Database2.dbo.Table1 As db2 Where db2.oldLogon = Database1.dbo.table2.OldLogon))

 

Here is your SQL Statement, but it will works if:

1- The user that has access to Database1 has access to Database2

2- If the relation between tables are one-to-one. 

 

Thanks,


Viewing all articles
Browse latest Browse all 16

Trending Articles



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