Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2012
    Posts
    28

    Unanswered: SUBTYPE(oracle compatibilty)

    i m trying to create a simple package in DB2 10.1 that is as follows

    CREATE OR REPLACE PACKAGE math
    IS
    SUBTYPE tinyint IS INTEGER RANGE -256 .. 255 NOT NULL
    END;

    i have set oracle compatbility using "db2set DB2_COMPATIBILITY_VECTOR=ORA" and used IBM data studio to run the code. It should have worked as it is mentioned in the IBM website "http://pic.dhe.ibm.com/infocenter/db2luw/v10r1/index.jsp?topic=%2Fcom.ibm.db2.luw.apdv.plsql.doc% 2Fdoc%2Fc0060658.html".
    But i m getting "An unexpected token "IS" was found following "SUBTYPE tinyint IS INTEGER RANGE -256 .. 255 NOT NULL". Expected tokens may include: "'".. SQLCODE=-104, SQLSTATE=42601, DRIVER=4.13.111
    " error.

  2. #2
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    PL/SQL statements should be terminated with semicolons, for one thing.
    ---
    "It does not work" is not a valid problem statement.

Posting Permissions

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