Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Function

Re: Function

From: <fitzjarrell_at_cox.net>
Date: 22 May 2007 10:18:51 -0700
Message-ID: <1179840819.812054.312450@y18g2000prd.googlegroups.com>


On May 22, 7:24 am, rajeshdhu..._at_gmail.com wrote:
> i wants to create a function which will return more than one parameter
>
> Example
>
> CREATE OR REPLACE FUNCTION showArticalBrandStyle(ano number,catno
> number,divno number) RETURN varchar2 IS
> artcode varchar2(30);
> brand varchar2(10);
> tmpVar varchar2(30);
> BEGIN
> SELECT artical_code INTO artcode FROM artical WHERE artical_no=ano;
> dbms_output.put_line(substr(artcode,11,3));
> brand:=getbrandname(substr(artcode,11,3),1);
> return(brand);
> SELECT style_name INTO style FROM categorystyle WHERE
> STYLE_NO=SUBSTR(artcode,14,2) and category_no=catno and
> division_no=divno;
> return brand||' '||style;
> END;
>
> but it is not working

A function is designed to return one parameter, not many. Change your thought process, make this a procedure and you may then return as many parameters as you like (within reason).

David Fitzjarrell Received on Tue May 22 2007 - 12:18:51 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US