Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

SQL Interpolation by time. Is it Possible?

918638Feb 20 2012 — edited Feb 23 2012
I have table Named, FAC_TABLE

Time(datetime)____________|______Value(Number)
02/01/2008 10:16:04 AM,______|________10
02/01/2008 10:18:04 AM,______|________13
02/01/2008 10:19:04 AM,______|________11
02/01/2008 10:20:04 AM,______|________12
02/01/2008 10:21:04 AM,______|________10
02/01/2008 10:23:04 AM,______|________11
02/01/2008 10:24:04 AM,______|________16
02/01/2008 10:25:04 AM,______|________15
02/01/2008 10:27:04 AM,______|________15

We have values in accordance with time, with out an common time interval. My need is to interpolate and get values with specific time interval say per '5 min'.
Is it possible to create a SQL Query to get interpolated values in a specific time-span?
eg Output :-

Time(datetime)____________|______Value(Number)
02/01/2008 10:16:04 AM,______|________10
02/01/2008 10:21:04 AM,______|________10
02/01/2008 10:26:04 AM,______|________15
Here there is no time '02/01/2008 10:26:04 AM' in Raw data but Interpolation will get the data in accordance to time.

I can programmatically do By getting all values from DB, But It will take more iteration and for getting from DB and for processing. So I'm looking for a SQL solution. Is this Possible?
I'm Using Oracle 11g.

Edited by: mCm on Feb 20, 2012 10:32 PM
This post has been answered by Frank Kulash on Feb 20 2012
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 22 2012
Added on Feb 20 2012
16 comments
2,343 views