Skip to Main Content

SQL Developer Data Modeler

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

DDL formatting incorrect with VARCHAR(max)

CurbedLarryJun 19 2019 — edited Jun 20 2019

I'm modelling for SQL Server and sadly MAX data type lengths aren't generally handled.  They can be imported to a Domain but then you can't modify them, or you can indirectly define them as a type (https://community.oracle.com/message/11255981).

Also the DDL output is not formatted correctly, see this example:

CREATE TABLE Incident

    (

    Incidentid          INTEGER NOT NULL,

    Sourcesystemid      INTEGER,

    Incidenttypeid      INTEGER,

    Incidentsubtypeid   INTEGER,

    Incidentdetail      VARCHAR

(Max), Resolutiondate Datetime2, Investigationdate Datetime2, Incidentdate Datetime2 )

GO

Note the carriage return before the (Max), no further carriage returns, plus the GO becomes all uppercase.  Change the VARCHAR length to a regular number and the DDL is formatted correctly:

CREATE TABLE Incident (

    Incidentid          INTEGER NOT NULL,

    Sourcesystemid      INTEGER,

    Incidenttypeid      INTEGER,

    Incidentsubtypeid   INTEGER,

    Incidentdetail      VARCHAR(1000),

    Resolutiondate      Datetime2,

    Investigationdate   Datetime2,

    Incidentdate        Datetime2

)

Go

This post has been answered by Philip Stoyanov-Oracle on Jun 19 2019
Jump to Answer
Comments
Post Details
Added on Jun 19 2019
3 comments
367 views