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: 9i R2 database vs. 9i R2 Forms Developer PL/SQL compatibility

Re: 9i R2 database vs. 9i R2 Forms Developer PL/SQL compatibility

From: Maximus <asdfasdasd_at_eqeqweqwe.com>
Date: Wed, 20 Aug 2003 17:38:28 GMT
Message-ID: <omO0b.793271$3C2.17969182@news3.calgary.shaw.ca>


"Sybrand Bakker" <gooiditweg_at_sybrandb.demon.nl> wrote in message news:7jb7kv8ncctbrtdtru8sv9rvs1ftiimoi9_at_4ax.com...
> On Wed, 20 Aug 2003 17:02:58 GMT, "Maximus" <asdfasdasd_at_eqeqweqwe.com>
> wrote:
>
> >it compiles and works as documented. However, in Forms Developer I get a
> >compile error "no function 'VARCHAR2' exists in this scope."
>
> The type definition doesn't make sense. Why you would index a table by
> a varchar2?

For associative array functionality (it's a documented feature in the 9i R2 PL/SQL reference) for key/value pairs:

DECLARE
    TYPE CUST_ID_TYPE IS TABLE OF NUMBER INDEX BY VARCHAR(30);     CUST_ID CUST_ID_TYPE;
    ID NUMBER;
BEGIN
    CUST_ID('FLINTSONE') := 1;
    CUST_ID('RUBBLE') := 7;
    ID := CUST_ID('FLINTSTONE');
    ...
END; Received on Wed Aug 20 2003 - 12:38:28 CDT

Original text of this message

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