| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.theory -> in clause problem
hi, my name is Georg Gruber and this is my first posting to this newsgroup.
i hope i'm right here with my question.
i have the following problem...
there are three tables
C (id, name) M (id, name) R (id, ref_c_id, ref_m_id)
Values are:
C
1, C1 2, C2 3, C3
M
1, M1 2, M2 3, M3 4, M4 5, M5
R
1, 1, 1 2, 1, 2 3, 1, 3 4, 2, 2 5, 2, 3 6, 3, 3 7, 3, 4 8, 4, 5
Now i want to select via multiple choise from table M some values and get exactly the name from the according data from table T.
For example:
i want to get all entries from table T when the have M2 AND M3 set in R.
result would be: 1, 2 but not 3 because i doesn't have M2.
i tried IN CLAUSE but this won't work right because IN makes a logical OR.
does anybody know a good answer? do i have to build subqueries or temporary tables or something?
thanks for your time and help,
Georg Gruber.
georg_gruber_at_web.de
![]() |
![]() |