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: Frank van Bortel <frank.van.bortel_at_gmail.com>
Date: Tue, 22 May 2007 15:31:15 +0200
Message-ID: <f2urav$329$1@news5.zwoll1.ov.home.nl>


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

rajeshdhumal_at_gmail.com wrote:
> i wants to create a function which will return more than one parameter

Cannot be done.
>
> Example
>
> CREATE OR REPLACE FUNCTION showArticalBrandStyle(ano number,catno
> number,divno number) RETURN varchar2 IS

And you do not - this will just return a varchar2

> 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);

That's it - I'm done, will return to calling program, no idea what this code is doing blow this...

> 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
>

What is not working?
Your two returns? Of course not - ditch the first, and you'll get 1 return valu, containing two concatenated column values. Errors, screendumps, versions...
- --
Regards,
Frank van Bortel

Top-posting is one way to shut me up...
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (MingW32)

iD8DBQFGUvCjLw8L4IAs830RAjdkAJ9UI/AB2LOfOjD29cx5SuYKYe9r+ACeOvp0 5FzcD5pK9r4SzTTIs1n9rhk=
=dXR6
-----END PGP SIGNATURE----- Received on Tue May 22 2007 - 08:31:15 CDT

Original text of this message

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