fix SQL syntax error, fallout from #22034