I have a SQL Table like this:
Table1:
| SomeID1 | OtherID1 | Data1
+----------------+-------------+-------------------
| abcdef-..... | cdef123-... | {18,20,22}
| abcdef-..... | 4554a24-... | {17,19}
| 987654-..... | 12324a2-... | {13,19,20}
And another table with:
Table 2:
| SomeID2 | OtherID2 | Data2
+----------------+-------------+-------------------
| abcdef-..... | cdef123-... | 13
| abcdef-..... | 4554a24-... | 14
| 987654-..... | 12324a2-... | 15
| abcdef-..... | 4554a24-... | 16
| 987654-..... | 12324a2-... | 17
Is it possible to gather one Data1 value from table1 and search in table2 like:
select * from table2 where Data2 in ('18','20','22')
Im looking for something like this:
select * from table2 where Data2 in (select Data1 from table1 where SomeID1='abcdef')
PD: I did not make the table