现有的表格样式和SQL语句:逻辑幢号,户编号,单元号,楼层,房号,建筑面积,套内面积,分摊面积,分摊系数,用途
SQL语句:SELECT right('0000'+shisLogicBuild.LogicBldNo,4) as ljzh,right('0000'+CAST ( p.RoomNo AS varchar ),4) as hh,P.Cellno,f.floorname,p.DoorNo,p.ARCHAREA,p.SETINAREA,p.APPAREA,AC.AppCoeff,p.USEPURPOSe
from shisbuildinf b
left join Shisproperty P on p.buildingid=b.id left join shisappcoeff AC on p.AppcoeffID=AC.ID
left join shisfloors f on p.floorid=f.id
left join shiscells C on P.cellno = C.Cellno and C.Buildingid = P.buildingid inner join shisLogicBuild on shisLogicBuild.id=c.LogicBldid
where b.id =[BUILDID] order by p.REROOMCODE
想将逻辑幢号改为幢号,单元号改为单元名,排序依据楼层、单元、房号进行排序,既改为如下表格样式:
幢号,户编号,单元名,楼层,房号,建筑面积,套内面积,分摊面积,分摊系数,用途
谢谢帮助!
全部评论