Home » SQL & PL/SQL » SQL & PL/SQL » Field Combination query (merged 3)
icon1.gif  Field Combination query (merged 3) [message #418344] Fri, 14 August 2009 05:07 Go to next message
Messages: 1
Registered: August 2009
Junior Member
Table below has data about ptp and his respective plan id and plan effective date
I need to find all the existing plan transfer combination.
If you see the ptp id 11 has been to 3 plans
6,7,8 respectively in that case the plan transfer combinations are

The expected output is to display above three row. It needs to be done for every ptp id

Ptp id Plan id Plan effective date
11 07 01/01/2009
11 08 01/01/2008
11 06 11/01/2007
12 11 05/05/2004
12 15 02/11/2001
13 20 02/12/2004

Thanks in advance. let me know if you need more details.


[Updated on: Fri, 14 August 2009 06:07] by Moderator

Report message to a moderator

Re: Field Combination query (merged) [message #418348 is a reply to message #418344] Fri, 14 August 2009 05:16 Go to previous message
Michel Cadot
Messages: 63911
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
You can use hierarchical query.

Post a working Test case: create table and insert statements along with the result you want with these data.
Before please read OraFAQ Forum Guide, especially "How to format your post?" section.
Make sure that lines of code do not exceed 80 characters when you format.
Indent the code (See SQL Formatter), use code tags and align the columns in result.
Use the "Preview Message" button to verify.
Also always post your Oracle version with 4 decimals.


Previous Topic: Really need help...
Next Topic: SQL Generation
Goto Forum:

Current Time: Sat Oct 22 00:45:40 CDT 2016

Total time taken to generate the page: 0.12682 seconds