Topic
IC4NOTICE: developerWorks Community will be offline May 29-30, 2015 while we upgrade to the latest version of IBM Connections. For more information, read our upgrade FAQ.
1 reply Latest Post - ‏2012-03-23T12:09:53Z by ClausSamuelsen
TestUser.
TestUser.
1 Post
ACCEPTED ANSWER

Pinned topic Split a string in stored procedure

‏2012-03-12T21:25:34Z |
Hi All,

I would like to split a string inside stored procedure.

Lets say the String is 'Group1,gr2,testGr3'. I would like to split this string inside the stored procedure on the deliminator ,. and I would like to see the result as
Group1
gr2
testGr3

Is it possible in Informix 9.X DB?

Please help me in this?

Thanks in advance.
Updated on 2012-03-23T12:09:53Z at 2012-03-23T12:09:53Z by ClausSamuelsen
  • ClausSamuelsen
    ClausSamuelsen
    11 Posts
    ACCEPTED ANSWER

    Re: Split a string in stored procedure

    ‏2012-03-23T12:09:53Z  in response to TestUser.
    You can download, compile and install the regexp bladelet. It contains the function regexp_split that does exactly what you are looking for.
    See developerWorks article http://www.ibm.com/developerworks/data/zones/informix/library/techarticle/db_regexp.html