Advertisement

02.26.2003 at 03:11PM PST, ID: 20531192
[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.2

SQL PLUS 4 table join by delimited list

Asked by Jon_Raymond in Oracle 3rd Party Tools

Tags:

I need to delete items in on table based on values linked thru 3 other tables.  I tried this, which was too slow:

DELETE  FROM PP_REQUIREMENT_DETAILS      
WHERE RESOURCE_REQUIREMENT_ID IN
     (SELECT rr.RESOURCE_REQUIREMENT_ID
     FROM    PP_RESOURCE_REQUIREMENTS        rr      
     WHERE     rr.Task_ID                          IN        
                                                               (SELECT TASK_ID
                                                               FROM PA_TASKS
                                                               WHERE PROJECT_ID IN
                                                                          (SELECT PROJECT_ID
                                                                       FROM PA_PROJECTS
                                                                       WHERE PROJECT_NUMBER IN
               (     '20519',
                    '20307',
                    '20287',
                    '1747.04',
                    '1747.03',))))


Then I tried this:

DELETE  FROM PP_REQUIREMENT_DETAILS WHERE RESOURCE_REQUIREMENT_ID IN (SELECT rr.RESOURCE_REQUIREMENT_ID FROM PP_RESOURCE_REQUIREMENTS rr WHERE rr.Task_ID IN (SELECT TASK_ID FROM PA_TASKS WHERE PROJECT_ID IN (SELECT PROJECT_ID FROM PA_PROJECTS WHERE PROJECT_NUMBER = '20519')))/
DELETE  FROM PP_REQUIREMENT_DETAILS WHERE RESOURCE_REQUIREMENT_ID IN (SELECT rr.RESOURCE_REQUIREMENT_ID FROM PP_RESOURCE_REQUIREMENTS rr WHERE rr.Task_ID IN (SELECT TASK_ID FROM PA_TASKS WHERE PROJECT_ID IN (SELECT PROJECT_ID FROM PA_PROJECTS WHERE PROJECT_NUMBER = '20307')))/
DELETE  FROM PP_REQUIREMENT_DETAILS WHERE RESOURCE_REQUIREMENT_ID IN (SELECT rr.RESOURCE_REQUIREMENT_ID FROM PP_RESOURCE_REQUIREMENTS rr WHERE rr.Task_ID IN (SELECT TASK_ID FROM PA_TASKS WHERE PROJECT_ID IN (SELECT PROJECT_ID FROM PA_PROJECTS WHERE PROJECT_NUMBER = '20287')))/
DELETE  FROM PP_REQUIREMENT_DETAILS WHERE RESOURCE_REQUIREMENT_ID IN (SELECT rr.RESOURCE_REQUIREMENT_ID FROM PP_RESOURCE_REQUIREMENTS rr WHERE rr.Task_ID IN (SELECT TASK_ID FROM PA_TASKS WHERE PROJECT_ID IN (SELECT PROJECT_ID FROM PA_PROJECTS WHERE PROJECT_NUMBER = '1747.04')))/
DELETE  FROM PP_REQUIREMENT_DETAILS WHERE RESOURCE_REQUIREMENT_ID IN (SELECT rr.RESOURCE_REQUIREMENT_ID FROM PP_RESOURCE_REQUIREMENTS rr WHERE rr.Task_ID IN (SELECT TASK_ID FROM PA_TASKS WHERE PROJECT_ID IN (SELECT PROJECT_ID FROM PA_PROJECTS WHERE PROJECT_NUMBER = '1747.03')))/


This is multiple delete statements for each value.  The slash should probably a semicolon.  But, I can't get it to work in SQL PLUS.  I need the correct syntax and options to run multiple statements in a block like this in SQL PLUS.  

Or - perhaps there's a better way.Start Free Trial
[+][-]02.26.2003 at 04:06PM PST, ID: 8029628

View this solution now by starting your 14-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 3rd Party Tools
Tags: pa_projects
Sign Up Now!
Solution Provided By: Danielzt
Participating Experts: 2
Solution Grade: A
 
 
[+][-]02.26.2003 at 04:45PM PST, ID: 8029874

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 14-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20081112-EE-VQP-43