SQL Server Compare Lists - How Find Items in One Table That Are Not in Another Table

Опубликовано: 13 Ноябрь 2020
на канале: Sean MacKenzie Data Engineering
2,017
30

SQL Server Compare Lists - How Find Items in One Table That Are Not in Another Table


In this episode, we’ll return to our data engineering playlist in order to show how to compare two lists in SQL Server and find out which items are in one list but not another, and vice versa. This is an important query to learn for comparing large lists which might be hard to compare otherwise (think millions of rows). This is unfortunately a technique that many analysts do not learn, and I’ve heard horror stories of programmers making procedures with loops to the same end. I hope this one can benefit your project!

Follow us on social media:

  / mackenziedataanalytics  
  / seamacke  
  / seamacke  
  / psmackenzie  

Get Microsoft Office including Access:
https://click.linksynergy.com/fs-bin/...

Got a YouTube Channel? I use TubeBuddy, it is awesome. Give it a try:
https://www.tubebuddy.com/seanmackenz...

  / seamacke  

Thinking of a data warehouse project? Contact me today! http://www.mackenziemackenzie.com/

Check out some of my earlier videos on Data Engineering:

How to make a transaction in SQL Server that rolls back when an error occurs:
   • How to make a transaction in SQL Serv...  

How to Avoid SQL Injection by Using Parameterized Queries in .Net
   • How to Avoid SQL Injection by Using P...  

SQL Server Percentiles - How to Use percentile_cont to Group Data by Upper, Middle, and Lower Thirds :
   • SQL Server Percentiles - How to Use p...  

How to Use DataViews to Filter and Sort ADO.Net DataTables :
   • How to Use DataViews to Filter and So...  

Insert One Million Rows into SQL Server - How to Use SqlBulkCopy
   • Insert One Million Rows into SQL Serv...  

How to Make a Delimited List in One Field Using TSQL
   • How to Make a Delimited List in One F...  

How to Extract Data from SQL Server Using vb.Net, SqlClient, and ConfigurationManager
   • How to Extract Data from SQL Server U...  


sql server compare list, tsql compare list, in one list but not in the other, left join, tsql left join, sql left join, find unmatched query, sql find matching, sql find unmatched