Results 1 to 5 of 5
  1. #1
    Join Date
    Nov 2004
    Posts
    3

    Unanswered: Creating an index-by table TYPE causes an error

    When I try to create an index-by table on a schema level, for example:

    CREATE OR REPLACE TYPE name_table is TABLE of VARCHAR(30)
    INDEX BY BINARY_INTEGER;

    I get an error:

    1/23 PLS-00355: use of pl/sql table not allowed in this context

    The error happens only if I try to create an index-by table on a schema level. If I create an index-by table in a package, everything is OK. But it's useless for me, since JDBC can't work with types defined in a package.

    When I remove the "INDEX BY BINARY_INTEGER" clause, it works with no errors even on a schema level.

    Does anybody know what causes the error and if there is any workaround?

    I work with Oracle 9.2.0.1.0 for Windows

    Thanks in advance.

  2. #2
    Join Date
    Jun 2003
    Location
    West Palm Beach, FL
    Posts
    2,713

    Thumbs down

    INDEX BY BINARY_INTEGER is only valid in PL/SQL.
    The person who says it can't be done should not interrupt the person doing it. -- Chinese proverb

  3. #3
    Join Date
    Nov 2004
    Posts
    3
    Well, I don't understand your reply. PL/SQL is what I'm using ....

  4. #4
    Join Date
    Nov 2004
    Posts
    3
    I got the point. it can be only used in PL/SQL procedures, named or anymous

  5. #5
    Join Date
    Sep 2004
    Location
    London, UK
    Posts
    565
    "CREATE OR REPLACE TYPE" is not PL/SQL.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •