Xref: alice comp.databases.oracle.server:77508
Path: alice!news-feed.fnsi.net!newsfeed.icl.net!diablo.theplanet.net!news.theplanet.net!newspost.theplanet.net!not-for-mail
From: Connor McDonald <connor_mcdonald@yahoo.com>
Newsgroups: comp.databases.oracle.server
Subject: Re: Sizeof in PL/SQL
Date: Sun, 12 Dec 1999 19:00:52 +0800
Organization: Customer of Planet Online
Lines: 37
Message-ID: <38538064.6873@yahoo.com>
References: <82tvab$s31$1@nnrp1.deja.com>
Reply-To: connor_mcdonald@yahoo.com
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Trace: newsg2.svr.pol.co.uk 945025172 16512 62.136.146.232 (12 Dec 1999 18:59:32 GMT)
NNTP-Posting-Date: 12 Dec 1999 18:59:32 GMT
X-Complaints-To: abuse@theplanet.net
X-Mailer: Mozilla 3.01 (Win95; I)
To: Andrew Protasov <a_protasov@hotmail.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@yahoo.com

"Some days you're the pigeon, and some days you're the statue."
