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) )..is 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...
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.