1 Reply Latest reply: Aug 4, 2017 6:34 PM by Kannan Sundaram RSS

    CONCAT function sort issue

    Kannan Sundaram

      Hello QV developers,

      I have column of text like this:

       

      Col1
      Text10
      Text17
      Text3
      Text4
      Text5
      Text6
      Text7
      Text8
      Text1
      Text2
      Text11
      Text12
      Text13
      Text14
      Text15
      Text16
      Text45
      Text24
      Text21
      Text76
      Text18

       

       

      I am trying to use CONCAT function in the script like this so that I can get all text values in one cell.

       

      LOAD

      CONCAT(Col1, ';') As ConcatCol

      RESIDENT

      Test1

       

      The result looks like this:

       

       

      ConcatCol
      Text1;Text10;Text11;Text12;Text13;Text14;Text15;Text16;Text17;Text17;Text18;Text2;Text21;Text24;Text3;Text4;Text45;Text5;Text6;Text7;Text76;Text8

      This is not what I desire. The Text gets already sorted before the concatenation. I want the result in the same order as the rows appear in the first table like

       

      This is what I desire

      Text10;Text17;Text3;Text4 ...

       

      How can I achieve this? Thanks for your help.