I'm executing the following query:
mysql = "local oilhours real;oilhours = 0;for(select * from aggregates where name = 'AA-FO-MFM' and period = 600 and avg > 15 and (ts > '01-jan-04' and ts < '01-feb-04') do oilhours = oilhours + 1;end;"
when I execute the above query .... oilhours = 36.6 which is correct. Now what I want to do is in my VBA code I want to assign the value of oilhours to the variable myoilhours. How is this done. I think it is going to require parameters but not sure.
Thanks,
David
mysql = "local oilhours real;oilhours = 0;for(select * from aggregates where name = 'AA-FO-MFM' and period = 600 and avg > 15 and (ts > '01-jan-04' and ts < '01-feb-04') do oilhours = oilhours + 1;end;"
when I execute the above query .... oilhours = 36.6 which is correct. Now what I want to do is in my VBA code I want to assign the value of oilhours to the variable myoilhours. How is this done. I think it is going to require parameters but not sure.
Thanks,
David