Results 1 to 7 of 7
  1. #1
    Join Date
    Nov 2002
    Posts
    3

    Unanswered: Calculated fields in views

    I'm trying to add two number(7,3) fields to each other in a view. The field works correctly, but is no longer a number(7,3). Oracle makes this field just a number field. I need to force the format of the view to be number(7,3).

    Any ideas?

  2. #2
    Join Date
    Sep 2002
    Location
    UK
    Posts
    5,171
    Provided Answers: 1

    Re: Calculated fields in views

    Originally posted by bdmingus
    I'm trying to add two number(7,3) fields to each other in a view. The field works correctly, but is no longer a number(7,3). Oracle makes this field just a number field. I need to force the format of the view to be number(7,3).

    Any ideas?
    I don't believe it is possible, but then I don't believe it is necessary either. Why do you think you need to force the scale and precision values?

    If you COULD do it, and the two NUMBER(7,3) columns being added together contained 5678.123 and 6789.123, then the result (12467.246) would overflow the precision anyway.

  3. #3
    Join Date
    Nov 2002
    Posts
    3

    Two Number(7,3)

    I'm trying to do it because ArcMap software truncates the decimal places on a calculated field. I need to force three decimal places. The number will never be outside the boundaries of 7,3. So, any ideas?

  4. #4
    Join Date
    Sep 2002
    Location
    UK
    Posts
    5,171
    Provided Answers: 1

    Re: Two Number(7,3)

    Originally posted by bdmingus
    I'm trying to do it because ArcMap software truncates the decimal places on a calculated field. I need to force three decimal places. The number will never be outside the boundaries of 7,3. So, any ideas?
    No - what is ArcMap? And does it look up the view's column definition in the data dictionary to decide how to display it?

  5. #5
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    did you try CAST(expression AS NUMBER(7,3)


    rudy

  6. #6
    Join Date
    Nov 2002
    Posts
    3

    CAST

    Yep. I thought it would work, but it didn't. When I describe the view after casting it still shows the field as number with no precision or scale.

  7. #7
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    CAST inside the view doesn't work?

    whoa, sounds like you need to re-install oracle

    (just kidding)

Posting Permissions

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