|
楼主 |
发表于 2017-5-4 15:10:35
|
显示全部楼层
select PT_ExcellenceProject.*,PM_Project.fProjectCode as fProjectCode,PM_Project.fProjectName as fProjectName,PM_Project.fProjectAddress as fProjectAddress,PM_Project.fProjectType as fProjectType,PM_Project.fQualityStandards as fQualityStandards,PM_Project.fBuildName as fBuildName,PM_Project.fProjectScale as fProjectScale,PM_Project.fProjectMoney as fProjectMoney,PM_Project.fActSDate as fActSDate,PM_Project.fActEDate as fActEDate,PM_Project.fManageUnit as fManageUnit,PM_Project.fFManageUnit as fFManageUnit,PT_ProjectApply.fApplyName2 as fApplyName2,PT_ExampleProject.FB_BizState as FB_BizState,customSub8.count1 as count10086
from PT_ExcellenceProject PT_ExcellenceProject
optional join PM_Project PM_Project on PT_ExcellenceProject.fProjID = PM_Project
optional join PT_ProjectApply PT_ProjectApply on PT_ExcellenceProject.fProjID = PT_ProjectApply.fProjID
optional join PT_ExampleProject PT_ExampleProject on PT_ExcellenceProject.fProjID = PT_ExampleProject.fProjID
optional join (select (count(PT_buildingSecurityProduceAssess)) as count1, PT_buildingSecurityProduceAssess.fProjectID as fProjectID from PT_buildingSecurityProduceAssess PT_buildingSecurityProduceAssess group by PT_buildingSecurityProduceAssess.fProjectID) customSub8 on PT_ExcellenceProject.fProjID = customSub8.fProjectID
where PT_ProjectApply.fTableType = '施工许可证'
这个是我的源码 没有设置计算规则 也没有和查询列冲突 就是不显示 |
|