db_lock(mdb);
mdb->db_escape_string(jcr, esc, cr->Counter, strlen(cr->Counter));
- Mmsg(mdb->cmd, "SELECT 'MinValue','MaxValue',CurrentValue,WrapCounter "
+ Mmsg(mdb->cmd, "SELECT Counters.MinValue,Counters.MaxValue,CurrentValue,WrapCounter "
"FROM Counters WHERE Counter='%s'", esc);
if (QUERY_DB(jcr, mdb, mdb->cmd)) {