Nth Occurence

Comments

3 comments

  • Official comment
    Joel Stewart

    Thanks for the question BJ. This sounds like the TOKENIZE function. 

    With the TOKENIZE function, you can extract a specific element from the original string. Alternatively, you can create a list of all elements using the separator value. 

    If you'd prefer single rows for each result instead of a one-cell LIST type object, you can wrap the EXPAND function around the resulting LIST type. 

    Comment actions Permalink
  • BJ Erickson

    Thanks!

     

    Is there a way to put each value in it's own column? 

    Example:

    Col1                                   Col2   Col3   Col4   Col5    Col6

    1234_4321_abc_cda_aa      1234   4321   abc    cda    aa

    0
    Comment actions Permalink
  • Joel Stewart

    You can use the LISTELEMENT function in order to be able to extract values out of a list into a column. There is not a function to expand all the lists fully into separate columns, each list element that you want would need to be extracted into a dedicated column.

    This is trivial for the example case which you have displayed that contains 5 records in the list.

    0
    Comment actions Permalink

Please sign in to leave a comment.