Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> Re: Newbie : PL/SQL Function Return value
> Hi. I've just started working with PL/SQL and have defined functions that
> return a string. The problem is I'm creating a view using a whole lot of
> these type of functions, and the view ends up having a large number of
> varchar2(4000) fields. How can I force the function result to have a
> specific size if it is not based on an existing field type?
You can limit the size of a VARCHAR variable in PL/SQL, e.g.
CREATE OR REPLACE FUNCTION myFunc (myString VARCHAR2) RETURN VARCHAR2
IS
returnString VARCHAR2(100);
BEGIN
-- Knut Lassmann myToys.de GmbH +49-30-72 62 01 411 I had joy, I had fun, I had Pacman on a SUN(E3500).Received on Tue Aug 15 2000 - 09:24:25 CDT
![]() |
![]() |