以文本方式查看主题 - Foxtable(狐表) (http://foxtable.com/bbs/index.asp) -- 专家坐堂 (http://foxtable.com/bbs/list.asp?boardid=2) ---- select语句怎么换行? (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=138006) |
-- 作者:石四 -- 发布时间:2019/7/20 11:32:00 -- select语句怎么换行? 代码里有select长语句,不能用空格+*+回车实现换行,怎么办呢? Dim sql1 As String = "Select 日期,板料编码,板料规格,实剪,(CAST(LEFT(板料规格,charindex(\'*\',板料规格)-1) As DECIMAL(2,1)) * CAST(SUBSTRING(板料规格,charindex(\'*\',板料规格)+1,charindex(\'*\',板料规格,6)-charindex(\'*\',板料规格)-1) As SMALLINT) * CAST(RIGHT(板料规格,LEN(板料规格)-charindex(\'*\',板料规格,6)) As SMALLINT)*7.85*实剪)/1000000000 As 耗用_重量 FR OM {投料}" Dim b1 As New GroupTableBuilder("统计表1",sql1, "dfgt") |
-- 作者:y2287958 -- 发布时间:2019/7/20 13:01:00 -- 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") |
-- 作者:石四 -- 发布时间:2019/7/20 14:14:00 -- THANKS |
-- 作者:有点蓝 -- 发布时间:2019/7/20 14:31:00 -- 也可以参考:http://www.foxtable.com/webhelp/topics/2489.htm |