Modofied SQL statement to get random name in the range provided by the
user.