Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

simple function return error ?

SmithJohn45Mar 24 2025 — edited Mar 24 2025

kindly have a look and guide what is wrong here? function compiled without error. my simple select statement is running fine

create or replace FUNCTION hr_get_attd_id
RETURN number 
IS
v_attd_id number:=0;
begin
 select nvl(max(attd_id),0)+1 into v_attd_id from STU_ATT_MST@EDULINKS_253;
 return v_attd_id;
end;

select * from hr_get_attd_id();

Error at line 1/15: ORA-22905: cannot access rows from a non-nested table item

please help.

with kind regards

This post has been answered by Cookiemonster76 on Mar 24 2025
Jump to Answer
Comments
Post Details
Added on Mar 24 2025
2 comments
145 views