界面如下图展示效果:请进入西安企云基创软件
SQL语句写法如下:
selectceiling(count(*)/10.0),'ROOT=【Number:'+STR(COUNT(*))
+'】 【Import ct.:'+(cast(sum(FirstInStorageWeight)asvarchar(30)))
+'】 【Estimate ct.:'+(cast(sum(EstimateWeight)asvarchar(30)))
+'】 【Current ct.:'+(cast(sum(CurrentWeight)asvarchar(30)))+'】'
from (selectx.RecordID,x.DiamondID,x.OriginalWeight,x.FirstInStorageWeight,x.EstimateWeight,x.CurrentWeight
from DiamondDB.dbo.DiamondStock x
left joinDiamondDB.dbo.DiamondQuality y on x.Quality=y.QualityID
left joinDiamondDB.dbo.DiamondShape z on x.Shape=z.ShapeID
left joinDiamondDB.dbo.DiamondClarity a on x.Clarity=a.ClarityID
left joinDiamondDB.dbo.DiamondColor b on x.Color=b.ColorID
left joinDiamondDB.dbo.DiamondSymmetry d on x.Symmetry=d.SymmetryID
left joinDiamondDB.dbo.DiamondFluorescence f on x.Fluorescence=f.FluorescenceID
left joinDiamondDB.dbo.OriginalDiamondInStorageDetails o on x.DiamondID=o.DiamondID
left joinDiamondDB.dbo.ImportListMaster p on o.ListID=p.ListID ando.SerialNumber=p.SerialNumber
left joinDiamondDB.dbo.Supplier q on p.SupplierID=q.SupplierID
left joinDiamondDb.dbo.ProcessInfo u on x.ProcessID=u.ProcessID
left joinDiamondDB.dbo.ProcessType v on u.TypeID=v.TypeID
left joinDiamondPlatformDB.dbo.T_Employee te on x.EmpID=te.EmpID
left joinDiamondPlatformDB.dbo.T_Department td on te.DepID=td.DepID
where x.DiamondID=@Diamond_ and x.PackageNumber like '%'+@PackageNumber_+'%'and x.Shape=@shpeid_ and x.Color=@colorid_
andx.Clarity=@clarityid_ and x.Symmetry=@symmetryid_ andx.Fluorescence=@fluorescenceid_ and x.Quality=@qualityid_
andx.FirstInStorageWeight between @num1_ and @num2_ andx.ProcessStatus=@ProcessStatus_ and x.StorageStatus=@StorageStatus_
and o.ListID like'%'+@ListID_+'%' and o.SerialNumber like '%'+@SerialNumber_+'%' andx.IsFM=@IsFM_ and x.IsUrgent=@IsUrgent_
andq.SupplierID=@SupplierID_ and td.DepID=@DepID_ and te.EmpID=@EmpID_) t;