title: How can I know if 10385274000 fits into: NUMBER(10) for Oracle?
body: <p>I been working the whole week to troubleshot a production error. </p>
  
  <p>I have eventually got the the point where I can find the culprit record which is causing all the mess. </p>
  
  <p>I've got the following error message:</p>
  
  <pre><code>java.sql.SQLException: [BEA][Oracle JDBC Driver][Oracle]ORA-01438: value larger than specified precision allows for this column
  </code></pre>
  
  <p>Eventuall from all the info I think this might be the wrong data, the system is trying to insert: </p>
  
  <pre><code>10385274000
  </code></pre>
  
  <p>Into a NUMBER(10)</p>
  
  <p>How can I know if that value fits or no?</p>
  
  <p>Thank you</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>As per Michel Todd suggestion:</p>
  
  <pre><code>create table xyz( testfield number( 10 ) );
  
  insert into xyz values( 10385274000 )
  
  
  Error: ORA-01438: value larger than specified precision allowed for this column
  </code></pre>
  
  <p>Thank you guys!!! </p>
  
  <p>Thank you stackoverflow</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>Notes to my self ( not to forget what was the problem ) </p>
  
  <p>I had this Oracle product which stores in a database table the time of an event</p>
  
  <pre><code>START_TIME|END_TIME
  </code></pre>
  
  <p>It turns out everynight it backups this information into another table but performs a trnsformation in the process. It does store as:</p>
  
  <pre><code>TOTALTIME
  </code></pre>
  
  <p>The problem comes when this field is calculated by subtracting ENDTIME - STARTTIME. The resulting number is stored in this column which is defined as: <strong>NUMBER(10)</strong></p>
  
  <p>Well, it turns out if END_TIME-START_TIME are too far away in the time ( about 4 months or so ) the value ( in milliseconds ) would be SO big it won't fit in the target column ( I guess it has something like endTime.getTime() - startTime.getTime() inside the code )</p>
  
  <p>All this sounds too easy and too silly now, but it took me 4 day+ to find out, because since this is a closed application I didn't have a clue of what was happening, the only thing I've got was the stacktrace. </p>
  
  <p>I had to reverse engineer ( in the OLD sense of the word, by hand and obviously with out the source) the entire process to find this out. </p>
  
  <p>When I did it, I've got the same error in my "hand coded migrator" and find out how to solve it!</p>