Если значение clientcode в NULL на этом магазине pro c, я получаю ошибки, пожалуйста, помогите. Oracle Ошибка базы данных ORA-20004: ошибка возникает в xxxxxxxxxxORA-06512:
PROCEDURE sp_getclientcontacts (
idnumber VARCHAR2,
curreturn OUT SYS_REFCURSOR)
IS
clientcode VARCHAR2 (50);
BEGIN
SELECT client_key
INTO clientcode
FROM ( SELECT client.client_key
FROM client
WHERE client.cli_id_no = idnumber
)
/*ADVICE(21): This item has not been declared, or it refers to a label [131] */
WHERE ROWNUM = 1;
IF clientcode is not null
then
BEGIN
OPEN curreturn FOR
SELECT cc.cli_id_no, cc.cli_cell_phone, cc.cli_email
FROM insight.client cc
WHERE cc.client_key = clientcode;
END;
end if;
EXCEPTION
WHEN OTHERS
/*ADVICE(35): A WHEN OTHERS clause is used in the exception section
without any other specific handlers [201] */
THEN
ROLLBACK;
raise_application_error (-20004,
'Error is Raised in sp_getclientcontacts');
NULL;
END;