from plm_technical_specification_sheet a left join view_Project_final_Part b on a.site=b.site and a.test_part_no=b.test_part_no
from plm_technical_specification_sheet a left join view_Project_final_Part b on a.site=b.site and a.test_part_no=b.test_part_no
left join plm_bom_detail c on a.site=c.site and b.final_part_no=c.part_no and a.eng_chg_level=c.eng_chg_level and a.bom_alternative_no=c.alternative_no and a.bom_type=c.bom_type
left join plm_routing_detail c on a.site=c.site and b.final_part_no=c.part_no and a.eng_chg_level=c.eng_chg_level
and a.routing_alternative_no=c.alternative_no and a.routing_type=c.routing_type
where a.site=#{site} and a.code_no=#{codeNo} and a.project_id=b.project_id and a.status='Buildable'
where a.site=#{site} and a.code_no=#{codeNo} and a.project_id=b.project_id and c.status='Buildable'