Solved

Oracle number(12) to seconds

Posted on 2013-01-11
3
493 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 142

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 142

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Oracle Syntax 8 56
sql query 9 38
Query Records that don't match 8 34
Use of Exception to end a Loop 3 19
Note: this article covers simple compression. Oracle introduced in version 11g release 2 a new feature called Advanced Compression which is not covered here. General principle of Oracle compression Oracle compression is a way of reducing the d…
Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
This video explains at a high level with the mandatory Oracle Memory processes are as well as touching on some of the more common optional ones.
This video explains at a high level about the four available data types in Oracle and how dates can be manipulated by the user to get data into and out of the database.

867 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now