change getpoint sql query