Uploaded image for project: 'DdlUtils'
  1. DdlUtils
  2. DDLUTILS-225

Automatic datatype change LONG VARCHAR to CLOB lacks necessary cast, ORA-00997

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 1.0
    • 1.1
    • Core - Oracle
    • None
    • Oracle 9.2.0.1
      J2SE 1.5

    Description

      I try reading a database model, which contains a table with LONG VARCHAR columns in it. As described in the documentation, the write-back of the unchanged model to Oracle results in a ColumnDataTypeChange (to CLOB).
      When the change is to be applied to the DB, there is no cast from LONG VARCHAR to LOB. Say I have a table

      CREATE TABLE T (
      DATA LONG VARCHAR
      );

      the script, which is generated by ddlutils is

      CREATE TABLE T_ (
      DATA CLOB
      );

      INSERT INTO T_ (DATA) SELECT DATA FROM T;

      [...]

      At this point Oracle exits with ORA-00997: Unzulässige Verwendung des Datentyps LONG

      IMHO the script should have been

      INSERT INTO T_ (DATA) SELECT TO_LOB(DATA) FROM T;

      which works fine.

      Attachments

        Activity

          People

            tomdz Thomas Dudziak
            maximalz Max Meier
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: