SELECT EMPLOYEE_ID,
LOWER(NAME) AS NAME,
CP_ID
FROM
EMPLOYEE
WHERE CP_ID = 4
AND LOWER(NAME) LIKE '%alpha%' AND rownum < 1001
ORDER BY employee.name;
However, in the LIKE operator, when I supply %Alpha% or %ALPHA%, it doesn’t return any result. Is there a way I could convert the text between %% so that regardless of what case user enters, it will always receive small case text which could be searched for. I am using Oracle database
I am not sure what that is because I didn’t set up the database things. Please tell me how that is related and what do I need to check , I will check with the person who created the database. Thanks
I think in the application language you need to convert the value being used in the LIKE comparison to be lowercase. The query is already comparing against converting the value in the db column to lowercase. The part where is says LOWER(NAME) is converting the name to lowercase and comparing against the input of the right operand of the LIKE comparison.