This discussion is archived
2 Replies Latest reply: Nov 6, 2012 2:26 AM by 972750 RSS

SQL Developer - DIFF Report - number(38,0)

MMTeixeira Newbie
Currently Being Moderated
We are trying to create a gold schema for our data model and we are using DIFF to help us identify differences - one differnece that I notice comes up quite frequently is the following:

ALTER TABLE "GOLD"."<table_name>" MODIFY ("<column_name>" NUMBER(38,0));

When I do a describe on the tables they both show NUMBER(38) so I am not sure I need to do anything with the sql suggested in the Diff report. Any ideas why these appear for certain tables?

I am using SQL Developer 3.2.09. Thanks!
  • 1. Re: SQL Developer - DIFF Report - number(38,0)
    rp0428 Guru
    Currently Being Moderated
    >
    We are trying to create a gold schema for our data model and we are using DIFF to help us identify differences - one differnece that I notice comes up quite frequently is the following:

    ALTER TABLE "GOLD"."<table_name>" MODIFY ("<column_name>" NUMBER(38,0));

    When I do a describe on the tables they both show NUMBER(38) so I am not sure I need to do anything with the sql suggested in the Diff report. Any ideas why these appear for certain tables?
    >
    Could be a bug in sql developer; someone from the dev team will have to comment on that.

    But you are correct that NUMBER(38) is equivalent to NUMBER(38,0). Neither will accept decimal digits but will round them to the nearest integer.
    create table num (col1 number, col2 number(38), col3 number(38,0))
    
    insert into num values (123.456, 123.456, 123.456)
    
    select * from num
    
    COL1,COL2,COL3
    123.456,123,123
    See the Number datatype in the SQL Language doc
    http://docs.oracle.com/cd/B28359_01/server.111/b28286/sql_elements001.htm#sthref84
    >
    Specify an integer using the following form:
    NUMBER(p)
    This represents a fixed-point number with precision p and scale 0 and is equivalent to NUMBER(p,0).
    >
    So if your columns really are defined as you say you do not need to do anything.
  • 2. Re: SQL Developer - DIFF Report - number(38,0)
    972750 Newbie
    Currently Being Moderated
    I have been using DIFF for a few days and also noted DROP statements are not created for those objects found only on the target database. That would be a plus.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points