i wanted to compare and identify certain [transaction ids] that exist in one table which is located in server 1 but does not exist in a similar transformed table on a different server (server 2). These two tables were supposed to be the same but we noticed some transaction ids were missing on the table that is located in server 2. My goal is to identify all the missing transaction ids. The query that i am looking to write is as below
SELECT
server_1.table_1.[transaction_id] from server_1.table_1
JOIN
server_2.table_2 ON
Table_1.[transaction_id] = Table_2.[transaction_id]
WHERE
server_1.table_1.[transaction_id] NOT IN server_2.table_2.[transaction_id]
one recommendation I have received was "Let's select the IDs from the source select the result, right click and in SQL complete select general temp table script
Then you can run the scripts on the target server to create a temptable and perform your analysis
Because of the size of the table perhaps you need to do its in batches"
if anyone can help me explain this process as well please?
Thank you very much for your help in advance i am new for this , i apologize if I have not explained it enough or if i am not clear with my ask