Hi
Please help me solving this query..
I have 3 tables..
comm_propDB - ID | User_ID | mls_num
-
-----|---------------|---------------------
-
2 | 2 | 5004
-
3 | 2 | 8920
-
8 | 2 | 5540
-
5 | 3 | 5263
-
6 | 3 | 9999
-
7 | 8 | 1212
comm_propDBElements - ID | agent_ID | user_ID
-
-----|----------------|---------------------
-
42 | 845 | 3
-
43 | 845 | 3
-
44 | 269 | 2
-
88 | 300 | 2
-
46 | 124 | 8
-
47 | 840 | 7
ALL_ALLOWED_AGENT - ID agent_ID
-
-----|---------------
-
1 | 845
-
2 | 124
I want to write a query that will fetch data from comm_propDB table & comm_propDBElements table if agentID is present in ALL_ALLOWED_AGENT like this :-
-
ID agent_ID User_ID mls_num
-
---------------------------------------------------
-
2 845 2 5004
-
3 845 2 8920
-
8 845 2 5540
-
7 124 2 5004
I have tried everything but couldn`t succeed to solve this query.I also searched on net but didn`t get any perfect solution.
Please suggest the right query.
Thanks a lot.