here is my return of record, wo_nbr is my parent and wo_nbr_1 is the children, i need to look at the data under wo_nbr_1 and below that , until its at the lost level
select a.wo_nbr,a.lot_nbr ,SUBSTR(a.lot_nbr,2) wo_nbr1,a.qty, max (a.date_add)
from wod_table a
--left join wod_table b on SUBSTR(a.lot_nbr,2) = b.wo_nbr
where a.wo_nbr = '479598'
and a. type = '01' and a.lot_nbr like'W%' and a.qty > 0
group by a.wo_nbr,a.lot_nbr ,a.qty--,b.wo_nbr
WO_NBR LOT_NBR WO_NBR_1 QTY MAX(DATE_ADD)
479598 W484620 484620 1 6/13/2006
479598 W484622 484622 1 6/13/2006
479598 W484623 484623 1 7/26/2006
479598 W485868 485868 1 8/9/2006
479598 W486221 486221 1 8/14/2006
479598 W486222 486222 1 8/24/2006
479598 W486877 486877 1 7/5/2006
479598 W490464 490464 1 7/26/2006
479598 W494483 494483 1 9/13/2006