Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Create Function issue
On 11 Apr 2002 09:12:32 -0700, fshah01_at_hotmail.com (farhan) wrote:
>what is wrong with following Function?
>
>CREATE OR REPLACE FUNCTION PartLookUp(partno varchar2) RETURN varchar2
>AS
>begin
> select part_id, replacement_part_id from parts where part_id=partno;
>
> if parts.replacement_part_id <> '' then
> call PartLookUp(parts.replacement_part_id);
> end if;
>
> return parts.parts_id;
>
>end
Is this a quiz question? Can we earn anything by answering it? Or is
it just *homework*
A function always returns a result. The result should be assigned to
something.
Now, please draw the logical conclusion.
Regards
Sybrand Bakker, Senior Oracle DBA
To reply remove -verwijderdit from my e-mail address Received on Thu Apr 11 2002 - 12:15:40 CDT