Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Question on Function Return values
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
![]() |
![]() |