Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
T1:
load * Inline [
ID,age
A,22
B,33
C,44
D,55
E,66
];
//actually in table T1, there are a lot of rows, here only give simple example,
//I want to get specific row value ,such as ID='E', get its age and put to variable a,
//I don't know the row number of ID 'E', so I cannot use peek('ID', rowNumber)
let a = ???
thanks advanced.
------------------------------------------------------------------
I did it like this but I'm not sure whether there is a easy method to do that.
test:
load age resident T1 where ID='E';
let a = peek('age',0);
drop table test;
it takes too many steps,
who knows whether there is a easy way to do that? just one step?
Maybe this will be useful:
let a = lookup('age', 'ID', 'E', 'T1');
- Marcus
@grant_S at any time you can use :
T1:
load * Inline [
ID,age
A,22
B,33
C,44
D,55
E,66
];
Temp:
Load
ID as IDtmp,
age as agetmp
Resident T1 where Match(ID,'E')>0;
Let varID = Peek('IDtmp', 0, 'Temp');
Let varAge = Peek('agetmp', 0, 'Temp');
DROP Table Temp;
output in debeug
Maybe this will be useful:
let a = lookup('age', 'ID', 'E', 'T1');
- Marcus