Jump to content

SQL


Guest anubha pandey

Recommended Posts

Guest anubha pandey

Hi !I m working on netweaver platform.I want to know in detail bout an sql query which is used here for tree generation.with inter as (select lead(regionid, 1, objecttype) over (partition by bohierarchy.objecttype order by bohierarchy.id) ld,lead(regionid, 1) over (partition by bohierarchy.objecttype order by bohierarchy.id) ld1,lead(regioncode, 1) over (partition by bohierarchy.objecttype order by bohierarchy.id) regioncode,objecttype, regionid, systemId from bohierarchy) select distinct a.ld child_nodes, decode(a.ld1,null,a.objecttype, a.regioncode) regioncode from inter a where a.regionid='HLA0009999' and a.systemId='IDES-1' order by regioncodeTable used here is bohierarchy with fieldsid, objecttype, regioncode, regionid, systemid

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...