Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I need something like this ..
set vPERSONID=Aggr(Concat(DISTINCT PERSONID, ', '));
Query Output from database
PERSONID
28987
145672
675432
i need something like this in below variable ..
vPERSONID=(28987,145672,675432)
HI
Refer below example
Data:
Load * inline
[
Num
1
2
3
4
];
TempConcat:
LOAD Concat(Distinct Num,', ') as TempNum Resident Data;
Let val = FieldValue('TempNum',1);
Reply me if your not clear with example.
Yes its getting full set of value thru resident load ..
thanks .. so it solved rather putting for loop for 30 or 40 ID's per manager its taking time ..
so this way per manager ID whoever reports will get his list in single variable thru comma separated and i parse that value to further queries ..
thanks .. it helped ..
Getting data for iterative loop worked .. By dropping loading data
for example i=0
set the comma separted value then after in the bottom i dropping
DROP Table Data;
So next time with new i val its getting new set of comma separted value ..
thanks ..
set vPERSONID=Concat(TOTAL PERSONID,', ')
HI
Refer below example
Data:
Load * inline
[
Num
1
2
3
4
];
TempConcat:
LOAD Concat(Distinct Num,', ') as TempNum Resident Data;
Let val = FieldValue('TempNum',1);
Reply me if your not clear with example.
set vPERSONID=Concat(TOTAL PERSONID,', ');
trace $(vPERSONID);
its printing me as string val - Concat(TOTAL PERSON_IDENTIFIER,', ')
Not sure anything iam missing in the code ???
Yes its getting full set of value thru resident load ..
thanks .. so it solved rather putting for loop for 30 or 40 ID's per manager its taking time ..
so this way per manager ID whoever reports will get his list in single variable thru comma separated and i parse that value to further queries ..
thanks .. it helped ..
TempConcat:
LOAD Concat(Distinct Num,', ') as TempNum Resident Data;
Let val = FieldValue('TempNum',1);
this work for first set of rows .. (i=0 it pulled all comma separated value correctly)
then thru second load which i do in loop i=1 that i parse new variable to the query then i need new comma separted value but iam getting same value as above in that val$(i) .. its because iam using resident load ..as its getting value only for first set correctly
Getting data for iterative loop worked .. By dropping loading data
for example i=0
set the comma separted value then after in the bottom i dropping
DROP Table Data;
So next time with new i val its getting new set of comma separted value ..
thanks ..