Re: Programatically Accessing Column Length?

From: David Scott <dlscott_at_mindspring.com>
Date: Wed, 27 Aug 2003 02:28:22 GMT
Message-ID: <aHU2b.11645$jY2.4720_at_newsread1.news.atl.earthlink.net>


John,

From your example below, all you should need to do is to query ALL_TAB_COLUMNS to find the info you need, especially if you already know the table and column name.

David
"John Puopolo" <jpuopolo_at_bithammer.com> wrote in message news:9dc35188.0308260538.7d9f51e1_at_posting.google.com...
> All,
>
> I have a program that scans stored procedure names and parameters -
> this is working fine. My last problem to solve is being able to
> retrieve the max length of a given parameter. For example, given the
> following SP declaration:
>
> PROCEDURE PTest (p_foo IN mytable.mycol%TYPE);
>
> let's suppose that mytable.mycol is a VARCHAR2(255).
>
> When I query the SP parameters via all_arguments, I get back the fact
> that I'm dealing with a VARCHAR, but the length is never filled in.
>
> So, the question is... Is there a way to PROGRAMATICALLY retrieve the
> length of a VARCHAR2 column given only a stored procedure parameter
> whose type is anchored to that column?
>
> Any help appreciated.
>
> Thanks,
> John
Received on Wed Aug 27 2003 - 04:28:22 CEST

Original text of this message