fixed search function when sql server is case sensitive