SQL Interpolation by time. Is it Possible?
918638Feb 20 2012 — edited Feb 23 2012I 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