reagrding the hirarchy denormalizing


reagrding the hirarchy denormalizing


BP.bsnss_prtnr_id as level_0,

Level1.Bsnss_prtnr_prnt as  level1

,level2.Bsnss_prtnr_prnt as level2


t_business_partner.v_bsnss_prtnr  bp

 left join

 t_business_partner.v_bsnss_prtnr_hrrchy level1 on

 level1.bsnss_prtnr_chld = bp.bsnss_prtnr_id

left join

 t_business_partner.v_bsnss_prtnr_hrrchy level2 on

 level2.bsnss_prtnr_chld = level1.Bsnss_prtnr_prnt

where bp.bsnss_prtnr_id='4000003696'.

above is my query,

the problem is for '4000003696'  we have all the records for level_0 to level_2

but when records are 2 then

the possible value in level_1 get shit to level_0 and level 1

n same when records is 1 then it shift to level_0.

i dont want it to shift to left column.

do suggest me what to do


Re: reagrding the hirarchy denormalizing

all i have done is to denormalized the hirarchy..!!

if u can suggest me another method to denormailzed the hirarchy it will be veryusefull..!!

for information ,

hirarchy table is  t_business_partner.v_bsnss_prtnr_hrrchy is having child parent relationship,

and other table t_business_partner.v_bsnss_prtnr  is having name of child and parent records..!!

and we have five level of hirarchy ...!!

can u please suggest somethig that will be greatfull.

thanks in advance