Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have a total field with values ranges from 1 to 100.
It displays fine in ascending order in listbox but when I try to concat the values in a variable, sorting is not working.
Example, I have values like
0
1
2
4
23
25
42
65
100
when im concatinating these values using concat(distinct total,'/')
im Getting the follwing
0 / 1 /100 / 2 /23 /25 /42 / 65
but I want
0 / 1 / 2 /4 /23 /25 /42/65/100
Am I missing Something?
Try this
concat( No,'/',No)
If you want to it in script try like this
A:
LOAD * Inline [
AA
0
1
2
4
23
25
42
65
100
];
B:
NoConcatenate
LOAD
AA,
If(RowNo()=1, AA, Peek('BB',-1)&'/'&AA) AS BB
Resident A;
DROP Table A;
Hi Anbu,
Thank You so much...
Its Working Great!!!!
I want to know like what the third parameter actually does?
Third parameter is sort-weight.
From QV help
concat ([ distinct ] expression [, delimiter [, sort-weight]])
Returns the aggregated string concatenation of all values of expression iterated over a number of records as defined by a group by clause. Each value may be separated by the string found in delimiter. The order of concatenation may be determined by sort-weight. Sort-weight should return a numeric value where the lowest value will render the item to be sorted first. If the word distinct occurs before the expression, all duplicates will be disregarded.
Thanks again!
Sent from Samsung Mobile