Home » SQL & PL/SQL » SQL & PL/SQL » To Get dependent data from table (Oracle 10g)
To Get dependent data from table [message #359367] Sat, 15 November 2008 05:12 Go to next message
rsoma
Messages: 15
Registered: April 2005
Location: Chennai, India
Junior Member
Hi Guys

Following is my requirement

Need to get recursive values for the values.

Table ABC

Heads, Dependent Heads

XX AA
XX YY
AB XX
BB AA

Select Heads from ABC where Dependent Heads = "AA"

Output should be list from Heads, if the heads value is available in Dependent Heads then those heads value should list.

XX, BB, AB



Regards
Soma.




Re: To Get dependent data from table [message #359369 is a reply to message #359367] Sat, 15 November 2008 06:09 Go to previous messageGo to next message
pablolee
Messages: 2834
Registered: May 2007
Location: Scotland
Senior Member
What have you tried so far?
Re: To Get dependent data from table [message #359378 is a reply to message #359367] Sat, 15 November 2008 09:29 Go to previous message
Michel Cadot
Messages: 64103
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
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) and align the columns in result.
Use the "Preview Message" button to verify.
Also always post your Oracle version (4 decimals).

Post a test case: create table and insert statements along with the result you want with these data and why.

Regards
Michel
Previous Topic: Need help in writing query (merged)
Next Topic: how can one construct lexical analyzer in pl sql?
Goto Forum:
  


Current Time: Sun Dec 04 02:52:24 CST 2016

Total time taken to generate the page: 0.08404 seconds