Why do I get the error shown when I try to run this query in SQL Developer:
DECLARE
p_latitude number;
BEGIN
p_latitude:=TO_NUMBER(LTRIM(RTRIM(REGEXP_SUBSTR('BT1 1AA|54.60240|-5.92214|875082434', '[^|]+', 1, 2),'"'),'"'));
END;
Error:
ORA-06502: PL/SQL: numeric or value error: character to number conversion error
ORA-06512: at line 4
Can anyone help me solve this error?
Expected output:
54.60240