execute SQL on cursor object