Dim gd,gd1,gd2,gd3,gd4,gd5,gd6 As Double
gd = DataTables("商务通参与邀请").sqlCompute("Sum(费用)","[日期] = #" & e.NewValue & "#" )
gd2 = DataTables("网站消费").sqlCompute("Sum(点击)","[日期] = #" & e.NewValue & "# and [推广类型] = '百度 '")
gd3 = DataTables("网站消费").sqlCompute("Sum(消费)","[日期] = #" & e.NewValue & "# and [推广类型] = '百度 '")
gd1 = DataTables("商务通参与邀请").sqlCompute("Sum(离四)","[日期] = #" & e.NewValue & "#" )
gd4 = DataTables("离线宝").sqlCompute("Sum(非重复数量)","[开始时间] = #" & e.NewValue & "#")
gd5 = DataTables("四零零").sqlCompute("Sum(非重复数量)","[开始时间] = #" & e.NewValue & "#")
If e.DataRow.Isnull("费用") Then
e.DataRow("点击") = Nothing
e.DataRow("消费") = Nothing
Else
e.DataRow("点击") = gd2/gd
e.DataRow("消费") = gd3/gd
End If
If e.DataRow.Isnull("离四") Then
e.DataRow("离线宝") = Nothing
e.DataRow("电话400") = Nothing
Else
e.DataRow("离线宝") = gd4/gd1
e.DataRow("电话400") = gd5/gd1
End If
老师针对以上代码 在运行过程中速度很慢,是否有优化的方法或者新的统计思路