3 Replies Latest reply: Oct 18, 2012 3:06 AM by Lav Jain RSS

    concat issue

      Hi,

       

      I want to concat using Concat aggregate function.

       

      I have following values in a field which contains spaces.. like

       

      CustName

      John A

      Mac borr

      Shri Manik

      ..

      ..

       

      I am struggling to create a string like 'John A','Mac borr','Shri Manik' 

       

      I am using concat(CustName,',') which gives  ( John A,Mac borr,Shri Manik, ... ) I dont understand how do I put Quotes in that string..

      Any help please..

        • Re: concat issue
          Lav Jain

          Hi,

           

          Use:  concat(chr(39) & CustName & chr(39),',')

           

           

          Regards

            • Re: concat issue

              Thanks Qlik_techie,

               

              It works, can I put one more question, I am trying to use this to compare with existing string using Match.

              like,

               

              Match( 'Shri Manik', 'John A', 'Mac borr', 'Shri Manik')  should give me 3 as o/p.

               

              but when I use above as

               

              match( 'Shri Malik', concat(chr(39)&CustName&chr(39),',') )

               

              This returns me 0 always.. How can I use it to find value in string..??

                • Re: concat issue
                  Lav Jain

                  Instead of using : Match( 'Shri Manik', 'John A', 'Mac borr', 'Shri Manik')  to get the o/p 3 corresponding to the CustName.

                   

                  Load only CustName using separate load & use =FieldIndex('CustName','Shri Manik') to get 3.

                   

                  Let me know if this helps

                   

                   

                  Regards