I have the following table and I try to extract all lines with the B value for the fields RefD and all lines whose RefA fields to the value B and the value of their RefD fields is among those with value B for the fields RefD. If my table contains:
RefA ..... RefD
..K ........W
..Z ....... E
..A ........ B
..C ........ B
D ........ B
B ........ C
B ........ H
the result is that waiting
RefA RefD ....
A...... B
C ..... B
D ..... B
B ..... C
At the moment I made the two requests
the first on my table
Code:
SELECT * FROM TABLE WHERE RefD=B
And the second on the outcome of the requests
Code:
SELECT * FROM TABLE WHERE RefD=A OR RefD=C OR RefD=D
I want to know if it is possible to do this in one query.
Bookmarks