Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: How to limit the size of returned value from a stored function?
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"