remove extra wildcard from select query condition #3669