Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2005

    Unanswered: Number datatype in Oracle

    Hi guyz,

    About the 'Number' datatype in Oracle, what is the maximum data in can except? Can it except a number up to 400,000?

    and lets say, i hv a column of type number, how do i get the maximum number in that column ( without using max(column_name) ) there any other way to get max value...cause i tried using max aggregrate function, it didnt work, it returns 1 (im doing this query from vba excel connected to oracle) ...but if i do some other queries, it works...but if i try to insert any aggregrate function in my vba program, it would not return to correct result...

    thanx in advance

  2. #2
    Join Date
    Jan 2004
    Croatia, Europe
    Provided Answers: 4
    A1: Don't worry, you'll be able to store 400.000 into a number datatype table column / variable / whatever ... datatype NUMBER(precision, scale) can except up to NUMBER(1 to 38, -84 to 127), so it would be enough for you to declare it as a NUMBER(6).

    A2: If "SELECT MAX(column_name) FROM table_name;" didn't get the right answer, I don't know which aggregate function would ... I doubt you did something wrong in your application, rather than suspect Oracle's MAX function has a bug in it. You could, however, write a cursor and loop through all values, comparing every new one with the "maximum" to determine which one has the highest value.

Posting Permissions

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