Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
do you know if this is possible:
I have two tables:
TabA:
No. Value
1 100
2 300
3 200
TabB:
a
100
20
-50
200
100
-50
I want to load TabB with peek function related to tab A, but i need to use loop as well so that whenever the value goes below 0 it will give me the next n value from TabA.
TabB:
a b
100 100 =peek(Value, 0, 'TabA')
20 100 =peek(Value, 0, 'TabA')
-50 300 =peek(Value, 1, 'TabA')
200 300 =peek(Value, 1, 'TabA')
100 300 =peek(Value, 1, 'TabA')
-50 200 =peek(Value, 2, 'TabA')
How to do that?
Many thanks for help.
Hi,
Can you explain the logic to link field a and b
TabB:
a b
100 100 =peek(Value, 0, 'TabA')
20 100 =peek(Value, 0, 'TabA') -- ??
-50 300 =peek(Value, 1, 'TabA') -- ??
200 300 =peek(Value, 1, 'TabA') -- ??
100 300 =peek(Value, 1, 'TabA') -- ??
-50 200 =peek(Value, 2, 'TabA') -- ??
why don't you use applymap?
Map:
mapping load
Value,
No.
from TabA;
TabB.
load
a,
b,
applymap('Map',b,b) as No
from TabB;
Regards
That will not map correctly. It needs to have a logic to give the next value from tab A when the next value below 0 is met.