1 Reply Latest reply on Mar 14, 2018 9:47 AM by rareddy

    Split string comma separated - teiid query

    cm.kumar

      Is there a split string functionality which can split comma separated string in teiid query?

       

      We have to split the comma separated string and use the individual sub string to loop and perform some functionality?

       

      Any suggestion or alternate as well works?

       

      Thanks.

        • 1. Re: Split string comma separated - teiid query
          rareddy

          You can use TEXTTABLE for that for ex:

           

          select x.* from TEXTTABLE('one,two,three' COLUMNS col string ROW DELIMITER ',' DELIMITER ':') as x

           

          Since you are saying looping, I think you may be wanting to use this in a virtual stored procedure. Check the procedure language on how to cursor through results of select in a loop.