devxlogo

Case Sensitivity in Searches

Case Sensitivity in Searches

Question:
How can I ignore case when trying to SELECT allrecords that are LIKE a certain string variable? I have an employee’s name field in which the charactersare a combination of lower and upper case letters.I do not want users to be concerned about case when doing searches.

Answer:
The easiest solution is to write your queries using the UPPER() function (or whatever exact syntax your product supports):

    … WHERE UPPER(column)=’NAME’;

devx-admin

Share the Post: