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

Home -> Community -> Usenet -> c.d.o.server -> Re: Sizeof in PL/SQL

Re: Sizeof in PL/SQL

From: Connor McDonald <connor_mcdonald_at_yahoo.com>
Date: Sun, 12 Dec 1999 19:00:52 +0800
Message-ID: <38538064.6873@yahoo.com>


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." Received on Sun Dec 12 1999 - 05:00:52 CST

Original text of this message

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