[#825] Replace % with %% to escape it in sql statements