Why after this query
rst.Open "SELECT @T1:=(SUM(IF(JOB IN('PM','BT') AND CMD='DT',0,RT))-SUM(IF(JOB NOT IN('PM','BT') AND CMD Regexp 'C(S|T)T(S|T)|LC|DT|PP',RT,0)))/SUM(IF(JOB IN('PM','BT') AND CMD='DT',0,RT)),@T1 from rfb", conn
is an error - 'Run Time Error - 2147217871
Mixing of Group columns (Min(),Max(),Count(),...) with no Group columns is illegal if there is no Group By clause'
rst.Open "SELECT @T1:=(SUM(IF(JOB IN('PM','BT') AND CMD='DT',0,RT))-SUM(IF(JOB NOT IN('PM','BT') AND CMD Regexp 'C(S|T)T(S|T)|LC|DT|PP',RT,0)))/SUM(IF(JOB IN('PM','BT') AND CMD='DT',0,RT)),@T1 from rfb", conn
is an error - 'Run Time Error - 2147217871
Mixing of Group columns (Min(),Max(),Count(),...) with no Group columns is illegal if there is no Group By clause'