Fix problem with ANY sql query.