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!

ORA-06553: PLS-306: wrong number or types of arguments error

rosy91Jul 11 2012 — edited Jul 11 2012
Hi Friends,

While executing the the below function i am getting error like

I am using Oracle sql develper 2.1 version.
============================
ORA-06553: PLS-306: wrong number or types of arguments in call to 'FUNC_TEST'
06553. 00000 - "PLS-%s: %s"
============================

CREATE OR REPLACE FUNCTION FUNC_TEST
RETURN SYS_REFCURSOR
AS
PRAGMA AUTONOMOUS_TRANSACTION;
total_val number(5):= 65;
REF_TEST SYS_REFCURSOR;
cursor c1 is
select substr(data,1,3)||substr(data,5) new_col from text_1 for update of data;
BEGIN
FOR employee_rec in c1
LOOP
update text_1
set data = substr(employee_rec.new_col,1,4)||chr(total_val)||substr(employee_rec.new_col,5) where current of c1;
total_val:=total_val+1;
if total_val > 90 then
total_val :=65;
end if;
end loop;
commit;
OPEN REF_TEST FOR SELECT data FROM text_1;
RETURN REF_TEST;
END;
-----------------------
Table script:

create table text_1
(
data varchar2(20)
)

insert into text_1 values ('IAL030003IND')

Please suggest.

Thanks,
Lony
This post has been answered by unknown-7404 on Jul 11 2012
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 8 2012
Added on Jul 11 2012
11 comments
3,157 views