Skip to content

Instantly share code, notes, and snippets.

@vlapenkov
Created June 29, 2019 13:51
Show Gist options
  • Save vlapenkov/51e94f6c2ff7bedf37d07a200e1dfbf2 to your computer and use it in GitHub Desktop.
Save vlapenkov/51e94f6c2ff7bedf37d07a200e1dfbf2 to your computer and use it in GitHub Desktop.
Join data from two sql servers
select prRemote.*,prLocal.* from [193.107.181.75].YstTerminal.dbo.Producers prRemote full outer join YstTerminal.dbo.Producers prLocal
on prRemote.Producerid=prLocal.Producerid
where prRemote.producerid is null or prLocal.ProducerId is null
/*
select count(*) from [193.107.181.75].YstTerminal.dbo.Producers
select count(*) from YstTerminal.dbo.Producers
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment