Re: How to limit the size of the returned value from a Stored Function?

From: Matthias Koepf <mak_at_kis.datagroup.de>
Date: 1996/11/12
Message-ID: <32885CC0.43CA_at_kis.datagroup.de>#1/1


Vahidt A. Tadjkarimi wrote:
> I was wondering if it is possible to limit the size of a returned
> value from a Stored Function. Here is a small example:
> CREATE OR REPLACE FUNCTION plus_minus_f (val_1 IN NUMBER, val_2 IN
> NUMBER) RETURN CHAR
> IS
> BEGIN...
> END;
> /
> Once I call this function from a view or by itself the size of the
> returned value is VARCHAR2(2000) !!! Any hints?

We have exactly the same problem and need also help very urgent.

One possibility we found is to call in the view definition the rpad-function with the SP and the the desired length as arguments. Then you get a varchar2(length)-Field.

But this can't be the only way. We want to define the datatype somewhere else in the package or in the view definition. How can this be done ?

Matthias Koepf
mak_at_kis.datagroup.de Received on Tue Nov 12 1996 - 00:00:00 CET

Original text of this message