I have a Table_1 with columns "Index"and "Name" that looks like this:
Index Name
1 A
1 B
1 C
1 D
-----------
2 A
2 B
2 E
2 G
2 D
-----------
3 D
3 M
-----------
4 A
4 B
4 D
4 M
..........
I need to select from the table all the indices where "Name" contain both A and D. So I need to make query like:
Code:
SELECT Index FROM Table_1WHERE Name = 'A' AND Name = 'D'
which would give me indices 1, 2, 4.
There is a construction in the language that uses "OR" instead of "AND", but it does not return what I need.
Can anyone help me to construct the query for getting the information I need?