1 Reply Latest reply: May 19, 2015 3:46 AM by jagan mohan rao appala RSS

    Search and create colunm

    Hareen Bhagi

      Hi All,


      From column A in below format, I need to take first 10 digits if it starts with 0 then including 0 or if start from 4 then 9 digits


      Column A

      0440137215000010

      0440123684465326

      452135488996513

      0456813

      523487313

      95412586332

      0440137215000013

      440137215000014

      0440137215000015

      440137215000016

      0440137215000017

       

      I have tried the below..

      If(TextCount(ColumnA)>=9,If(WildMatch(ColumnA,'04*'),Left(ColumnA,10),If(WildMatch(ColumnA,'4*'),Left(ColumnA,9)))) as ColumnB

       

      Kindly help me out with this.

        • Re: Search and create colunm
          jagan mohan rao appala

          Hi,

           

          Try like this

           

          Data:

          LOAD

          ColumnA,

          If(Left(ColumnA, 1) = 0, Left(ColumnA, 10), If(Left(ColumnA, 1) = 4, Left(ColumnA, 9), ColumnA)) AS ColumnB

          INLINE [

          ColumnA

          0440137215000010

          0440123684465326

          452135488996513

          0456813

          523487313

          95412586332

          0440137215000013

          440137215000014

          0440137215000015

          440137215000016

          0440137215000017];

           

          Regards,

          Jagan.