4 Replies Latest reply: Dec 13, 2012 7:40 AM by Marwim RSS

    Bug in Domain handling v3.2.2?

    Marwim
      Hello,

      I use Data Modeler included in SQL Developer version 3.2.2.
      I imported a model from the Data Dictionary and applied Domains using the Wizard "Types to Domains". Yet when I view the generated domains in "Domainadministration" e.g. a NUMBER(5,2) is displayed with "Gesamtstellenzahl" 2 and "Nachkommastellen" 5. This would be 5 decimal places for a number that has a precision of 2.

      I assume that the fields are in the same order as in the english version, then "Nachkommastellen would be "Scale", according to the help file +For a numeric domain, the number of digits from the decimal point to the least significant digit+. So this is
      {code}
      Name NUMERIC_2_5_0v4
      Size
      Precision 2
      Scale 5{code}

      I generate some new domains
      {code}
      Name ID_10
      Size
      Precision 10
      Scale 0


      Name test
      Size
      Precision 0
      Scale 10{code}

      and I create a new table with
      col_1 -> Domain test
      col_2 -> Domain ID_10

      The generated DDL is
      {code}CREATE TABLE TEST
      (
      COL_1 NUMBER ,
      COL_2 NUMBER (10)
      )
      ;{code}

      What am I supposed to enter when I define a NUMBER(5,2) or a NUMBER(10)? The label don't make sense to me.

      Regards
      Marcus
        • 1. Re: Bug in Domain handling v3.2.2?
          Philip Stoyanov-Oracle
          Hello Marcus,

          thanks for reporting the problem. I logged bug for wrong transformation of logical types to domain.
          What am I supposed to enter when I define a NUMBER(5,2) or a NUMBER(10)? The label don't make sense to me.
          for NUMBER(5,2) you need to set precision=5 and scale=2, for NUMBER(10) you need only precision=10. scale=0 is ignored, otherwise scale could be negative or positive number.

          Philip
          • 2. Re: Bug in Domain handling v3.2.2?
            Marwim
            Hello Philip,
            for NUMBER(5,2) you need to set precision=5 and scale=2,
            that's what I would expect, but it seems that at least the label in the Domain Administration dialog are wrong, because I have to enter precision=2 and scale=5 to get a NUMBER(5,2).

            Regards
            Marcus
            • 3. Re: Bug in Domain handling v3.2.2?
              Philip Stoyanov-Oracle
              but it seems that at least the label in the Domain Administration dialog are wrong
              labels for the left column are:
              name
              Logical Type
              Size
              Units
              Precision
              Scale
              Domains File

              The first time I saw Windows in Bulgarian I was shocked and never tried it again.
              If you can confirm that Precision and Scale are not named properly in German then I'll log a bug for that.

              Regards,
              Philip
              • 4. Re: Bug in Domain handling v3.2.2?
                Marwim
                Mind-boggling

                today I reopened the diagram I created yesterday and the wrong types created from the domains were still there, so I reversed the scale <-> precision entries and only NUMBER columns were displayed. I reversed them again and now scale 5, precision 2 give the correct NUMBER(5,2).

                I hope noone expects me to understand this :-)

                Regards Marcus