为什么绑定到datagrid的sql,数据库中可执行结果,网页不显示(使用其他sql语句能显示) 10
sql="SELECTa.uppsas隐患上传部门,a.istopas一线员工人数,a.titletotalas问题或建议总数,b.canyuas一线员工参与人数,LTR...
sql = "SELECT a.upps as 隐患上传部门, a.istop as 一线员工人数, a.titletotal as 问题或建议总数, b.canyu as 一线员工参与人数, LTRIM(CONVERT(NUMERIC(9, 2), b.canyu * 100.0 / a.istop)) + '%' AS 参与度"
+"FROM (SELECT upps, istop, COUNT(company) AS titletotal FROM allpro WHERE (istop <> 0) GROUP BY upps, istop) AS a LEFT OUTER JOIN"
+" (SELECT upps, COUNT(DISTINCT person1) AS canyu FROM allpro WHERE (position = '一线员工') GROUP BY upps) AS b ON a.upps = b.upps"; 展开
+"FROM (SELECT upps, istop, COUNT(company) AS titletotal FROM allpro WHERE (istop <> 0) GROUP BY upps, istop) AS a LEFT OUTER JOIN"
+" (SELECT upps, COUNT(DISTINCT person1) AS canyu FROM allpro WHERE (position = '一线员工') GROUP BY upps) AS b ON a.upps = b.upps"; 展开
展开全部
一个简单的刷新例子
Private Sub Command6_Click()
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Combo1.Text = ""
Option1.Value = False
Option2.Value = False
rs1.Close
Dim var As String
var = "select * from 记录"
rs1.Open var, cnn, adOpenKeyset, adLockOptimistic
Set DataGrid1.DataSource = rs1
需要先关闭
Private Sub Command6_Click()
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Combo1.Text = ""
Option1.Value = False
Option2.Value = False
rs1.Close
Dim var As String
var = "select * from 记录"
rs1.Open var, cnn, adOpenKeyset, adLockOptimistic
Set DataGrid1.DataSource = rs1
需要先关闭
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询