Advertisement

09.17.2003 at 08:33AM PDT, ID: 20741411
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

8.3

Oracle 9i OUTER JOIN syntax

Asked by cressi in Oracle Product Info

Tags: , , ,

Hello all,

Here is the original SQL statement that did not need OUTER JOIN functionality, very basic all INNER:
SELECT  DISTINCT
a.group_id,
a.workorder_no,
b.assignment_no,
d.document_no,
d.source,
b.assignment_type,
b.assignment_class,
b.setid,
b.service_cust_id,
b.service_addr_num,
d.image_file_name,
b.start_dt,
b.end_dt,
d.week_end_dt,
b.business_type
FROM sysadm.ps_pb_wkord a,
sysadm.ps_pb_wkord_assig b,
sysadm.ps_pb_ts_control c,
sysadm.ps_pb_ts_header d
WHERE a.group_id = b.group_id
AND a.workorder_no = b.workorder_no
AND a.group_id = c.group_id
AND b.assignment_no = c.assignment_no
AND c.group_id = d.group_id
AND c.control_no = d.control_no


However, now the business rules need an outer join on the join of  'b.assignment_no = c.assignment_no' to retrieve assignments
that are in b but no match in c.  OUTER JOIN, right?.  Seperate queries against the tables prove that there are quite a few records in table b that are not in table c.  Here is the new query with the OUTER JOIN that I thought would remedy this:

SELECT DISTINCT
a.group_id,
a.workorder_no,
b.assignment_no,
d.document_no,
d.source,
b.assignment_type,
b.assignment_class,
b.setid,
b.service_cust_id,
b.service_addr_num,
d.image_file_name,
b.start_dt,
b.end_dt,
d.week_end_dt,
b.business_type
FROM sysadm.ps_pb_wkord_assig b
LEFT OUTER JOIN
sysadm.ps_pb_ts_control c
ON
b.assignment_no = c.assignment_no,
sysadm.ps_pb_wkord a,  
sysadm.ps_pb_ts_header d
WHERE a.group_id = b.group_id
AND a.workorder_no = b.workorder_no
AND a.group_id = c.group_id
AND c.group_id = d.group_id
AND c.control_no = d.control_no

This query however produces the exact same results as the query without the OUTER JOIN.  Is the problem that the other tables involved that do not have to be OUTER JOINED need to use the new 9i INNER JOIN syntax?  Basically, how do you OUTER JOIN some tables while INNER JOINING the others.  Thanks.Start Free Trial
[+][-]09.17.2003 at 09:18AM PDT, ID: 9379316

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.17.2003 at 09:48AM PDT, ID: 9379592

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.17.2003 at 09:52AM PDT, ID: 9379635

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.17.2003 at 10:11AM PDT, ID: 9379795

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.17.2003 at 10:50AM PDT, ID: 9380112

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.17.2003 at 11:11AM PDT, ID: 9380287

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.19.2003 at 12:45AM PDT, ID: 9391781

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Oracle Product Info
Tags: oracle, join, outer, syntax
Sign Up Now!
Solution Provided By: li_bao
Participating Experts: 3
Solution Grade: B
 
 
 
Loading Advertisement...
20080716-EE-VQP-32