select columns
from table1 t1
join table2 t2
on t2.code = t1.code
join table3 t3
on t3.code = t2.code
left join (select t4.code,.. other columns here
from table4 t4
join table5 t5
on t5.code = t4.code
)t
on t.code = t1.code
------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/