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: Help returning VARCHAR2 from a function

Re: Help returning VARCHAR2 from a function

From: Njål A. Ekern <n.a.ekern_at_usit.uio.no>
Date: Mon, 03 Aug 1998 05:40:53 +0200
Message-ID: <35C53145.4D7F@usit.uio.no>


Troy Fruetel wrote:
>
> Please respond by e-mail to
> Troy.Fruetel_at_connects.com
>
> I've created a function that returns a VARCHAR2, but the function fails if
> the value to be returned exceeds 200 characters. I want to be able to
> return VARCHAR2(1000), but that's not allowed. So I created a user-defined
> subtype of a variable that was VARCHAR2(1000), but that didn't help either.
> Any ideas?

You have to post more: At least the error-message. I suppose the error occur at runtime, since it works well with < 200 chars? Maybe your function is returning too many characters compared to how long the variable receiving the result is? Say, for instance, you try to return 1250 characters into a variable declared as varchar2(1000)?

> GetExpression(ExpressionSeqID Number) RETURN ExpressionText;

Or maybe they're of different type? The variable receiving the result from GetExpression above has to be declared as ExpressionText, not varchar2(1000), even though ExpressionText is varchar2(1000) (I think), because of strong type-matching.

>
> Thanks
> Troy Fruetel
> Connect

--
Njål Arild Ekern, ADB-seksjonen USIT
Postboks 1059 Blindern, 0316 OSLO
Tlf 22852477, fax 22852730 Received on Sun Aug 02 1998 - 22:40:53 CDT

Original text of this message

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