Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Sizeof in PL/SQL
I know about this solution, but it is too slow for runtime. I need something faster.
Andrew
In article <38538064.6873_at_yahoo.com>,
connor_mcdonald_at_yahoo.com wrote:
> Andrew Protasov wrote:
> >
> > Hi,
> >
> > Is there anything similar to C sizeof function
> > in PL/SQL? For example, if I have something
> > like
> >
> > declare
> > x varchar2(20);
> > i integer;
> > begin
> > i:=sizeof(x);
> > end;
> >
> > value of i must be always 20.
> >
> > There is vsize function, but it returns only
> > current size, not maximum.
> >
> > I know how to get column length from all_tab_columns,
> > but it is too slow.
> >
> > Andrew Protasov
> >
> > Sent via Deja.com http://www.deja.com/
> > Before you buy.
>
> You could always have a look at the definition of all_tab_columsn in
> dba_views and just pick out the bits you want to make it faster...
> --
> ===========================================
> Connor McDonald
> "These views mine, no-one elses etc etc"
> connor_mcdonald_at_yahoo.com
>
> "Some days you're the pigeon, and some days you're the statue."
>
Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Mon Dec 13 1999 - 10:08:36 CST