How to retrieve missing values of an id from a list? have a data structure that is value/tag inside a table on Oracle sql
Lets say I have this structore
exTable




ID
TAG
VALUE




1
1
x


1
4
y


2
2
x


2
3
y


2
4
z




I want to retrieve the missing tags for a list of values I have, for example [1,2,3,4,5]
In this case Im searching for this as an output if I look for (1,2)




ID
MISSINGTAG




1
2


1
3


1
5


2
1


2
5




Been trying with temp tables and joins but im still missing something because when i try to join I either dont get anything or just get the ones that do exists, I achieved want I want for one id using a minus
select column_value as COL_NAME
from table(sys.dbms_debug_vc2coll('1',
'2',
'3',
'4',
'5'))
MINUS
SELECT TAG FROM exTable WHERE ID='1';
But for doing it for a list of IDS im have not had luck
If im duplicating the question let me know
I don't fully follow your examples, if you could clarify them a little it might help, but in general it sounds like you're trying to find what data exists in one table but not another? If so, then you want to use a LEFT JOIN and a WHERE clause that filters on the missing records like so:
SELECT *
FROM TableWithAllRecords
LEFT JOIN TableMissingRecords
    ON TableWithAllRecords.KeyField = TableMissingRecords.ForeignKeyField
WHERE TableMissingRecords.ForeignKeyField IS NULL