Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I have some table:
Some_table:
LOAD * INLINE [
ID, Num
1, 2
2, 5
3, 6
4, 3
5, 1
6, 2
7, 7
8, 8
9, 9
10, 5
];
and another table with maximum field:
LOAD
Max(Num) as Max_ID
Resident Some_table;
Now, I want to save the value at the Max_ID field so i can run loop like this:
for i=1 to (The variable that containing the Max_ID value)
Sentiment:
LOAD
ID as Id_Max_ID,
'$(i)' as Num_of_Max_ID
Resident Some_table
next
My big issue is to save the field value into a variable.
Thank you!
Hi,
LET vVariable = Peek('Max_ID', 0, 'Some_table');
Hi,
LET vVariable = Peek('Max_ID', 0, 'Some_table');
You could use Peek or FieldValue function
Ex:
LET vMaxID = Peek('Max_ID');
Correct Answer
I have executed