Join Problem
-
Happy Saint Patrick's Day everyone. I'm stuck here at work, (wish i was watching basketball) but on to my problem. I need to run a query that will return a list of applications. I think I need to do a left join(?) as not all apps will have a person listed. I still need to display the rest of the info though, even if there isn't a person for it. Here is an example what I have so far: (BTW: I'm using oracle 8, and sql is not my specialty "obviously") Select d.application_name, f.first_name, f.last_name, d.servlet_context, d.after_hours_contact, d.context_description, d.database_access, d.test_link, d.notes, e.description, f.user_id, d.app_id, a.team_name from web_team a, web_developers b, web_app_resp_dev c, web_application_info d, web_app_resources e, user_profile f, web_team_lead g where d.team_id = a.team_id and d.app_id = c.app_id and a.team_id = 1 and f.user_id = c.dev_id and (f.user_id = b.dev_id or f.user_id = g.lead_id) and d.app_id = e.app_id order by d.application_name, e.description, f.last_name, f.first_name Brian Van Beek
-
Happy Saint Patrick's Day everyone. I'm stuck here at work, (wish i was watching basketball) but on to my problem. I need to run a query that will return a list of applications. I think I need to do a left join(?) as not all apps will have a person listed. I still need to display the rest of the info though, even if there isn't a person for it. Here is an example what I have so far: (BTW: I'm using oracle 8, and sql is not my specialty "obviously") Select d.application_name, f.first_name, f.last_name, d.servlet_context, d.after_hours_contact, d.context_description, d.database_access, d.test_link, d.notes, e.description, f.user_id, d.app_id, a.team_name from web_team a, web_developers b, web_app_resp_dev c, web_application_info d, web_app_resources e, user_profile f, web_team_lead g where d.team_id = a.team_id and d.app_id = c.app_id and a.team_id = 1 and f.user_id = c.dev_id and (f.user_id = b.dev_id or f.user_id = g.lead_id) and d.app_id = e.app_id order by d.application_name, e.description, f.last_name, f.first_name Brian Van Beek
Ooops...I forgot to add a little more info, i need all apps in table "d" even if they don't have a corresponding person in table "c" Brian Van Beek
-
Happy Saint Patrick's Day everyone. I'm stuck here at work, (wish i was watching basketball) but on to my problem. I need to run a query that will return a list of applications. I think I need to do a left join(?) as not all apps will have a person listed. I still need to display the rest of the info though, even if there isn't a person for it. Here is an example what I have so far: (BTW: I'm using oracle 8, and sql is not my specialty "obviously") Select d.application_name, f.first_name, f.last_name, d.servlet_context, d.after_hours_contact, d.context_description, d.database_access, d.test_link, d.notes, e.description, f.user_id, d.app_id, a.team_name from web_team a, web_developers b, web_app_resp_dev c, web_application_info d, web_app_resources e, user_profile f, web_team_lead g where d.team_id = a.team_id and d.app_id = c.app_id and a.team_id = 1 and f.user_id = c.dev_id and (f.user_id = b.dev_id or f.user_id = g.lead_id) and d.app_id = e.app_id order by d.application_name, e.description, f.last_name, f.first_name Brian Van Beek