1

Topic: ORA-06502: PL/SQL: numeric or value error

There is the simple auxiliary function used in a packet:

function get_file_row_type (p_fileID fp_obj_file.id%type)
return fp_obj_file%rowtype
is
l_res fp_obj_file%rowtype;
begin
select * into l_res from fp_obj_file where id = p_fileID;
return l_res;
end get_file_row_type;

We select record from fp_obj_file, we cause this function. As a result there is error ORA-06502: PL/SQL: numeric or value error.
In what there can be a problem?
Oracle Database 11g Release 11.2.0.4.0

2

Re: ORA-06502: PL/SQL: numeric or value error

Gram wrote:

it is caused this function. As a result there is error ORA-06502

RTFM [spoiler]

get_file_row_type (' any  ')

[/spoiler]

3

Re: ORA-06502: PL/SQL: numeric or value error

Elic wrote:

it is passed...
RTFM [spoiler]

get_file_row_type (' any  ')

[/spoiler]

Under debugging it is visible that value in function is transferred truly and it of numerical type.

4

Re: ORA-06502: PL/SQL: numeric or value error

Gram wrote:

it is visible

to You, certainly, more visibly.

5

Re: ORA-06502: PL/SQL: numeric or value error

Gram wrote:

There is the simple auxiliary function used in a packet:

function get_file_row_type (p_fileID fp_obj_file.id%type)
return fp_obj_file%rowtype
is
l_res fp_obj_file%rowtype;
begin
select * into l_res from fp_obj_file where id = p_fileID;
return l_res;
end get_file_row_type;

We select record from fp_obj_file, we cause this function. As a result there is error ORA-06502: PL/SQL: numeric or value error.
In what there can be a problem?
Oracle Database 11g Release 11.2.0.4.0

normally informs also row number on which flies
ps
on the table politicians are hung and flies there
.....
stax

6

Re: ORA-06502: PL/SQL: numeric or value error

Gram wrote:

Under debugging it is visible that value in function is transferred truly and it of numerical type.

Numerical it is good, and the same that fp_obj_file.id%type?

7

Re: ORA-06502: PL/SQL: numeric or value error

Gram;
Look, value of an input parameter

p_fileID
Whether 

corresponds to the declared type

fp_obj_file.id%type