>select r1.system, r1.rtp_id, trim(r1.st_name) + " / " + trim(r1.termini) as st_name_a, r1.lead, ; >r2.rtp_id, trim(r2.st_name) + " / " + trim(r2.termini) as st_name_b, r2.lead, ; >r3.rtp_id, trim(r3.st_name) + " / " + trim(r3.termini) as st_name_c, r3.lead, ; >deleted() as del1 ; >from rtp_projects r1 ; >left join rtp_projects r2 on r1.rtp_id = r2.parentproject ; >left join rtp_projects r3 on r2.rtp_id = r3.parentproject ; >where (r1.parentproject = 0 or isnull(r1.parentproject)) and ! isnull(r1.st_name) and ! isblank(r1.st_name); >order by r1.system, r1.st_name, r2.st_name, r3.st_name >>