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: Mark Brady <penguinconsulting_at_yahoo.com>
Date: 11 Mar 2002 09:31:14 -0800
Message-ID: <194588b5.0203110931.7f5beb58@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:31:14 CST

Original text of this message

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