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: Getting the date back from a Partition

Re: Getting the date back from a Partition

From: Jonathan Lewis <jonathan_at_jlcomp.demon.co.uk>
Date: Mon, 11 Mar 2002 17:42:34 -0000
Message-ID: <1015868477.1753.0.nnrp-01.9e984b29@news.demon.co.uk>

The idea I had in mind was to pass in an owner, table_name and partition name to
the function and use the function to
select the long (into a local 32K varchar) and return the structure high value(s)
either as a function return value, or for a multi-column partition as a set of
"in out" parameters.

--
Jonathan Lewis
http://www.jlcomp.demon.co.uk

Next Seminar - UK, April 3rd - 5th
http://www.jlcomp.demon.co.uk/seminar.html

Host to The Co-Operative Oracle Users' FAQ
http://www.jlcomp.demon.co.uk/faq/ind_faq.html

Author of:
Practical Oracle 8i: Building Efficient Databases


Mark Brady wrote in message
<194588b5.0203110931.7f5beb58_at_posting.google.com>...

>Jonathan,
>
>I don't think that Oracle will accept a LONG value as a parameter to a
>Function. I get ORA-00997: illegal use of Long Datatype.
>
>
>a Function Just converting to varchar:
>
>
> FUNCTION GetvarcharFromHighValue ( p_lHighValue LONG ) RETURN
>VARCHAR2
> AS
>
> v_sReturn VARCHAR2(3000);
>
> BEGIN
>
> v_sReturn := p_lHighValue;
>
> RETURN v_sReturn;
>
>
> END GetvarcharFromHighValue ;
>
>
>This compiles but:
>
>This Fails with the above error:
>
>Select GetvarcharFromHighValue (High_Value) FROM all_Tab_partitions
>
>
>"Jonathan Lewis" <jonathan_at_jlcomp.demon.co.uk> wrote in message
news:<1015535311.6009.0.nnrp-12.9e984b29_at_news.demon.co.uk>...
>> Depends what you want to use to get at it,
>> but pl/sql will happily read a "short long"
>> into a varchar2(). So one option is to
>> write a pl/sql function which reads the
>> long, extracts the date you want, and
>> returns it as a date.
>>
>> --
>> Jonathan Lewis
>> http://www.jlcomp.demon.co.uk
Received on Mon Mar 11 2002 - 11:42:34 CST

Original text of this message

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