Dim sql1 As String = "Select 日期,板料编码,板料规格,实剪,(CAST(LEFT(板料规格,charindex('*',板料规格)-1) As DECIMAL(2,1)) * " sql1 += "CAST(SUBSTRING(板料规格,charindex('*',板料规格)+1,charindex('*',板料规格,6)-charindex('*',板料规格)-1) As SMALLINT) * " sql1 += "CAST(RIGHT(板料规格,LEN(板料规格)-charindex('*',板料规格,6)) As SMALLINT)*7.85*实剪)/1000000000 As 耗用_重量 FR OM {投料}" Dim b1 As New GroupTableBuilder("统计表1",sql1, "dfgt")