Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Oracle number(12) to seconds

Posted on 2013-01-11
3
Medium Priority
?
527 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 143

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 2000 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

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

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

Have you ever had to make fundamental changes to a table in Oracle, but haven't been able to get any downtime?  I'm talking things like: * Dropping columns * Shrinking allocated space * Removing chained blocks and restoring the PCTFREE * Re-or…
I remember the day when someone asked me to create a user for an application developement. The user should be able to create views and materialized views and, so, I used the following syntax: (CODE) This way, I guessed, I would ensure that use…
Via a live example, show how to take different types of Oracle backups using RMAN.
This video explains what a user managed backup is and shows how to take one, providing a couple of simple example scripts.

715 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