Oracle Functions - VARCHAR2 length error (PLS-00215) -


i've been messing around last 2 hours, , can't seem find helpful (i've read on solutions, me aren't working). have following create function statement:

create function getbatchapprovalemail(net_id in number)   return varchar2   email_address varchar2(255);    cursor c1     select t1.approve_email       lms.lms_status_email t1         t1.net_id = net_id begin    open c1;   fetch c1 email_address;   close c1;    return email_address; end; / 

for reason, upon executing statement

pls-00215 error (string length constraints must in range(1 .. 32767)).

i've been reading , have said declare size varchar2, i've tried , doesn't make difference.

does have ideas? ps i'm new pl/sql possible other things aren't correct.

there few errors function. check below understand those.

create function getbatchapprovalemail(net_id in number)   return varchar2   email_address varchar2(255);    cursor c1(num number)           ---using passed parameter cursor     select t1.approve_email       lms.lms_status_email t1         t1.net_id = num;   begin    open c1(net_id);   --- ways pass parameter cursor.    fetch c1 email_address;    close c1;    return email_address; end; 

Comments

Popular posts from this blog

ios - UICollectionView Self Sizing Cells with Auto Layout -

node.js - ldapjs - write after end error -

DOM Manipulation in Wordpress (and elsewhere) using php -