dot-processCheck function

Internal function to send the fully qualified sql to the database and return the numerical result.