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: How to limit the size of returned value from a stored function?

Re: How to limit the size of returned value from a stored function?

From: Peter Mapson <mapsonp_at_ois.com.au>
Date: 1997/10/14
Message-ID: <3443864e.0@hawk.ois.net.au>#1/1

When you create the view, try "wrapping" your function call in a substr() function. Then the database will "know" how long a value to expect back from the function call. Otherwise, it just assumes the worst possible case, where the maximum value of a varchar2 column is 2000 bytes.

For example

create view xxxxxx as
  select substr( my_function(), 1, 20 ) my_column   from my_view

will give a view definition where my_column is varchar2( 20 )

Peter Mapson
mapsonp_at_spam.com.au


To reply to my email, replace "spam" with "ois"


Received on Tue Oct 14 1997 - 00:00:00 CDT

Original text of this message

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