Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Create Function issue
Farhan -
Now that the function has been compiled, it will exist in your view that contains the source of this function. Take a look at the view user_source. Using the line numbers referenced spit out when you try to compile this thing, use the user_source view to pin down your specific errors. I recommend checking the user_source view because blank lines in a PL/SQL source file will NOT be loaded into the source, and the error line numbers will reflect that.
Anyway, there are a couple of things that come to mind here. First, you always need to select into a local variable inside of a PL/SQL block. Second, is there really such a thing as "call" in PL/SQL?
Nuff said.
TG
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
Received on Thu Apr 11 2002 - 12:43:35 CDT