Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: How to set the size of string returned by PL/SQL functions?
On Oct 4, 1:45 pm, madhusree..._at_gmail.com wrote:
> On Oct 4, 9:37 am, "John Heitmuller." <john.heitmul..._at_jrfcorp.net>
> wrote:
>
> > > create or replace view ..... as
> > > select ...,..., ..., ... ,cast(myfunc(myparam) as varchar2(15))
> > > mycol, ... from ... where ...;
>
> > Brilliant! Thanks, David.
>
> You could also use substr , as in create or replace view ..
> as ....select ....substr(param,1,15) as param ... from ...
>
> -Madhu Sreeram
The string is already no longer than 15 characters, and that doesn't change the column definition in the view, which is what the OP originally asked. Please read the post again.
David Fitzjarrell Received on Thu Oct 04 2007 - 15:01:55 CDT