Solved

Oracle number(12) to seconds

Posted on 2013-01-11
3
504 Views
Last Modified: 2013-01-11
Hi experts,

I'm new to database/sql, but using TOAD I'm trying to run senseful queries against an oracle database. I have problems understanding how an 'elapsed time' stored as number(12) can be translated to seconds. If at all possible. Maybe I'm looking at the wrong place for this data.
This shouldn't necessarily happen in the query, after export to excel is as good.

Thanks.
WatNog
0
Comment
Question by:Watnog
  • 2
3 Comments
 
LVL 143

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 500 total points
ID: 38766470
seconds is "time", and number(12) means up to 999999999999 seconds (if the elapsed time is indeed stored as seconds), which would mean plenty of years ...
0
 

Author Comment

by:Watnog
ID: 38766503
That would be weird, elapsed time is hours at the maximum. And one wouldn't create a 12 digit number if that wouldn't be necessary I guess. I will need to review this.
In the meantime thanks.
0
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 38766511
it may be milliseconds also ...
still 11574 days ...

for seconds in a day, you would need to store max 86400 as a number (so number(5))
for milliseconds it would be 3 digits more (number(8))
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Article by: Swadhin
From the Oracle SQL Reference (http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/queries006.htm) we are told that a join is a query that combines rows from two or more tables, views, or materialized views. This article provides a glimps…
From implementing a password expiration date, to datatype conversions and file export options, these are some useful settings I've found in Jasper Server.
This video shows information on the Oracle Data Dictionary, starting with the Oracle documentation, explaining the different types of Data Dictionary views available by group and permissions as well as giving examples on how to retrieve data from th…
Via a live example, show how to restore a database from backup after a simulated disk failure using RMAN.

790 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question