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

Home -> Community -> Usenet -> c.d.o.server -> Re: Question on Function Return values

Re: Question on Function Return values

From: John Russell <netnews2_at_johnrussell.mailshell.com>
Date: Fri, 18 Jan 2002 04:52:33 GMT
Message-ID: <a9af4u83gmremtc9ioj47mdajkk88uvtqb@4ax.com>


On 17 Jan 2002 15:45:03 -0800, botham_ian_at_hotmail.com (Ian Terence Botham) wrote:

>I wrote a function that usually returns a number but in a specific
>case of the logic , it should return a character. How is this
>possible.

Assuming the function is only called from PL/SQL, not SQL, you could declare the function return type as a record containing both a number and a varchar2 field. Set the "unused" part of the record to null so the calling function can check via IS NULL / IS NOT NULL which field to look at.

John

--
Got an Oracle database question?
Try the search engine for the database docs at:
http://tahiti.oracle.com/
Received on Thu Jan 17 2002 - 22:52:33 CST

Original text of this message

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