I need to compare userids in tables in databases in two SQL Servers running on two machines. I would like to do this using the Query Analyzer, for speed. Something like:
--connect through Query Analyzer gui to 1stSQLServer
select userid from 1stSQLServer.users
--connect to 2nd SQL Server
foreach userid in 1stSQLServer.users
select userid in 2ndSQLServer.users
if userid is null...
How do you connect to this 2ndSQLServer using the T-SQL of Query Analyzer?
--connect through Query Analyzer gui to 1stSQLServer
select userid from 1stSQLServer.users
--connect to 2nd SQL Server
foreach userid in 1stSQLServer.users
select userid in 2ndSQLServer.users
if userid is null...
How do you connect to this 2ndSQLServer using the T-SQL of Query Analyzer?