Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: DEREF Help
Page 9-33 of the 8.1.5 PL/SQL programming manual says that you must use the deref operator in a SQL statement.
Change your code from:
> p := deref(ref_p);
to
select defer(ref_p) into p from dual;
The error message isn't very helpful is it ?
--
Jonathan Lewis
Yet another Oracle-related web site: www.jlcomp.demon.co.uk
saks1000_at_my-deja.com wrote in message <7lbrof$vp$1_at_nnrp1.deja.com>...
>Does anybody see a problem with this code? I get a
>
>50/9 PLS-00306: wrong number or types of arguments in call
>to 'DEREF' error. The argument for deref however is a REF!
>
>
>
> MEMBER PROCEDURE print_faculty IS
> fac_array persons_array;
> ref_p REF person;
> p person;
> BEGIN
> fac_array := SELF.get_faculty();
> dbms_output.put_line(' ' || p.LastName);
>
> FOR i in 1.. fac_array.COUNT loop
> ref_p := fac_array(i);
> dbms_output.put(p.Pid);
> dbms_output.put(' ' || p.FirstName);
> dbms_output.put_line(' ' || p.LastName);
> END LOOP;
> END;
>
>
>Sent via Deja.com http://www.deja.com/
>Share what you know. Learn what you don't.
Received on Wed Jun 30 1999 - 04:11:14 CDT