Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Complex logic query that I cannot figure out:(
Hello again experts,
I am working on a query that pulls from 3 tables.
Table 1 - houses all user information Table 2 - houses all counts for the users Table 3 - houses all user info. for those users that are unique.
I have three parameter ID, Status and Group
I am trying to figure out how to write my query so that if a user selects a set of 3 parameters it pulls from Table 1 for example and if he/she chooses another set of 3 parameters it pulls from table 3 ect.
Here is my query that hopefully someone could help me finish. I am using oracle 9.2
Select a.ID,
a.Name, b.ID FROM Table 1 a LEFT OUTER JOIN Table 2 b ON a.id = b.id
a.id = c.id
WHERE
a.id in ID
AND
a.status in STATUS
AND
If someone could figure this out this would be most appreciated. Thanks. Received on Tue Dec 11 2007 - 16:41:08 CST