Home » SQL & PL/SQL » SQL & PL/SQL » urgent pls help me in this query
urgent pls help me in this query [message #223031] Wed, 07 March 2007 05:04 Go to next message
p.bhaskar
Messages: 33
Registered: February 2007
Location: kolkata
Member
i have a table with two column PARENT and CHILD.


PARENT	          CHILD
------            -----
5	             2
5	             3
18	             11
18	             7
17	             9
17	             8
26	             13
26	             1
26	             12
15	             10
15	             5
38	             15
38	             17
38	              6
 	             38
 	             26
 	             18


now i need a query where input will be specific level number to get data at specific level


select parent,child,level
from test_connect_by
start with parent is null
connect by prior child = parent
where level<=&level


i think level<=&level is not allowed.pls suggest me how i can get it.

[Updated on: Wed, 07 March 2007 05:45] by Moderator

Report message to a moderator

Re: urgent pls help me in this query [message #223037 is a reply to message #223031] Wed, 07 March 2007 05:35 Go to previous messageGo to next message
vamsi kasina
Messages: 2107
Registered: October 2003
Location: Riyadh, Saudi Arabia
Senior Member
Quote:
i think level<=&level is not allowed.pls suggest me how i can get it.
Try this
select parent,child,level
from test_connect_by
where level<=&l_level
start with parent is null
connect by prior child = parent
By
Vamsi
Re: urgent pls help me in this query [message #223041 is a reply to message #223037] Wed, 07 March 2007 05:45 Go to previous messageGo to next message
Maaher
Messages: 7062
Registered: December 2001
Senior Member
@p.bhaskar:
  1. Note that I changed your message by simply adding the tags [CODE] and [/CODE] around your code snippets.
  2. Your topic title is wrong: ALL questions are treated equal. "Urgent" will not help you. Your title does not efficiently describe your question.

Here are some useful links for you. Read them.
tips and tricks
all about formatting

MHE

[Updated on: Wed, 07 March 2007 05:50]

Report message to a moderator

Re: urgent pls help me in this query [message #223067 is a reply to message #223037] Wed, 07 March 2007 07:50 Go to previous message
p.bhaskar
Messages: 33
Registered: February 2007
Location: kolkata
Member
Thanx for this.
Previous Topic: DML statement
Next Topic: maximum open cursers exceeded
Goto Forum:
  


Current Time: Sat Dec 03 04:19:01 CST 2016

Total time taken to generate the page: 0.08280 seconds