Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> Re: Newbie : PL/SQL Function Return value

Re: Newbie : PL/SQL Function Return value

From: Knut Lassmann <knut.lassmann_at_mytoys.de>
Date: Tue, 15 Aug 2000 16:24:25 +0200
Message-ID: <39995299.386315C8@mytoys.de>

> 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

Original text of this message

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