If you are unable to create a new account, please email support@bspsoftware.com

 

how without SP(Oracle) calculate interpolation between two different tables

Started by ustas, 09 Mar 2012 10:39:01 PM

Previous topic - Next topic

ustas

Hi, you can discuss this theme , but here is my problem: how without SP(Oracle)  calculate interpolation between two different tables?
I have table T1(Time,Position) and T2(Time, Position) where may be T1.Time <> T2.Time or T1.Time = T2.Time , but all between 0 ... 100 sec.Precision of time in both tables is 3 sign. The goal: calculate difference between positions for new axis for time is 0; 0.1; 0.2... 100

cognostechie

This shouldn't be impossible because there are ways to join, union, merge and then calculate in Cognos.

Can you give an example of the data set and the result you need? Try giving the calculation that you would do manually to come up with the result as an example. 

blom0344

Hi,

I split the post by Ustas from the original topic involving the use of SP within framework as it no longer discusses the topic in a general sense, but concerns a very explicit question involving a users case..

Cheers..

ustas

Quote from: blom0344 on 11 Mar 2012 05:31:19 AM
Hi,

I split the post by Ustas from the original topic involving the use of SP within framework as it no longer discusses the topic in a general sense, but concerns a very explicit question involving a users case..

Cheers..
Ок.
1st table : Column Time (number).
Values:0.2;0.5;0.8;1.3;1.8;2.3;2.8
column Position (number)
Values:50;48;52;44;61;49;40

2nd table : Column Time (number).
Values:0.18;0.44;0.75;1.2;1.75;2.4;3.0
column Position (number)
Values:38;61;55;55;48;51;38

result:column Time (number)
Values:0.1;0.2;0.3..........2.9;3.0
column Position(number)
??????????????????????????????????

cognostechie

You did not say how you would manually or with a Stored Procedure calculate the result. In other words, I don't know what logic you are supposed to apply for getting the result. All it tells me is that you want the position to be shown in ascending order by time in intervals of 0.1 . We can only come up with a technical solution if we know the logic/business rules.

First of all, why do you have those two tables if both the fields are the same. Is it simply because the data is divided? If so, it can be unioned but I doubt if it's that simple. When you say you need the position by 0.1, 0.2, 0.3 .. 100, is the position for those times actually present in the position field or you need to calculate the position based on the position of other times? In your example, the position for 0.1 is not present.

This is like plotting the Time on X axis and Position on Y axis and then creating a line chart by connecting the dots but the position is changing randomly instead of a symmetrical order.

What would be the position of 0.1, 0.2 if you were to calculate manually or with a SP ?

ustas

You right. I want to calculate position in order time with step 0.1 sec, but position  and time changing randomly and I need use extrapolation for left and right times
What would be the position of 0.1, 0.2 if you were to calculate manually or with a SP ? For table1 the triangle proportion say -1* (48-50)*(0.5-0.1)/(0.5-0.2) +50=52.666.. The -1 , because left extrapolation