| Function declartation [message #638713] |
Fri, 19 June 2015 02:15  |
 |
arun888
Messages: 100 Registered: June 2015 Location: INDIA
|
Senior Member |
|
|
I am learning pl sql. I have created a function using PL SQL technology.
Using function I have tried to return the chain name. and I declared the datatype as number. But still the output is not generated.
set echo on
set serveroutput on
create or replace function get_str (par_c_str in number)
return character IS
c_sub store.subchain%type;
BEGIN
select chain into c_sub from store where store=par_c_str;
return c_sub;
end get_str
I have executed the above the function and received a below error. I need to change the data type. do u have any idea what data type I would neeed to change it.
ORA-06502: PL/SQL: numeric or value error: character string buffer too small
|
|
|
|
|
|
|
|
|
|