Solved

Oracle number(12) to seconds

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

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.

Join & Write a Comment

This article started out as an Experts-Exchange question, which then grew into a quick tip to go along with an IOUG presentation for the Collaborate confernce and then later grew again into a full blown article with expanded functionality and legacy…
Using SQL Scripts we can save all the SQL queries as files that we use very frequently on our database later point of time. This is one of the feature present under SQL Workshop in Oracle Application Express.
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.
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function

759 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

19 Experts available now in Live!

Get 1:1 Help Now