Learn the motive and how to resolve the ORA-01424 error message in Oracle.
Description
When you come upon an ORA-01424 error, the following error message will appear:
ORA-01424: lacking or illegal persona following the escape personality
Cause
You tried to execute a LIKE condition using an get away character, but you the personality following the escape personality used to be not percent or _.
Resolution
The option(s) to resolve this Oracle error are:
Option #1
Try enhancing your LIKE situation to use p.c or _ as the persona that follows the escape character.
For example, if you tried to execute the following SQL statement:
SELECT *
FROM suppliers
WHERE supplier_name LIKE 'H%!' ESCAPE '!';
This example denotes the ! persona as the get away character. However, on the grounds that you do not have the percent or _ character following the ! character, you would acquire the following error message:
You ought to correct this error by inserting either the percent or _ persona after the ! character, as follows:
SELECT *
FROM suppliers
WHERE supplier_name LIKE 'H%!%' ESCAPE '!';
This example returns all suppliers whose title begins with H and ends in %. For example, it would return a price such as ‘Hello%’.
OR
SELECT *
FROM suppliers
WHERE supplier_name LIKE 'H%!_' ESCAPE '!';
This instance returns all suppliers whose identify starts offevolved with H and ends in _. For example, it would return a value such as ‘Hello_’.
Leave a Review