Quantcast
Channel: Recent Questions - Stack Overflow
Viewing all articles
Browse latest Browse all 18035

SQL to locate missing records in one table

$
0
0

I'm using Oracle SQL and I need to ensure all my items are located in exactly 5 specific locations like below. My SQL is not good enough to get the correct syntax. The issue I face is that my items are located in only few of the 5 locations and I need to find the missing ones which i will use to upload manually into the database.

This is what I am hoping to achieve for all my items in exactly these locations.

enter image description here

Issue is that the database table has many locations but I need to find only those records where the item is missing in any of the 5 specific locations, the 5 specific locations being Austin, Boston, Chicago, Dallas and Houston.In the below screenshot, the ones in red are what im trying to obtain via an SQL.

enter image description here

Below is what I want the SQL to output. As mentioned above, once I find the missing records, I will manually upload them into the database. Any help with the SQL will be gladly helpful. Thanks in advance

enter image description here


Viewing all articles
Browse latest Browse all 18035

Trending Articles



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