Sunday, 15 May 2011

oracle hierarchical query given nodes and level -



oracle hierarchical query given nodes and level -

i have recursive table contains item code , parents.

table

items ( item_code varchar2(40), item_parent varchar2(40) )

problem

when specify level , items in query, want item's parents retrieved specified level in query. instead, when specify level items in level return.

i want retrieve items level 1 specified level.

example

select item_parent items level=3 , item code between item_code , item_code

i want item level 1 level 3 including item in select statement not item in level 3.

oracle-sqldeveloper

No comments:

Post a Comment