Topic
  • 1 reply
  • Latest Post - ‏2012-03-23T12:09:53Z by ClausSamuelsen
TestUser.
TestUser.
1 Post

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

    Re: Split a string in stored procedure

    ‏2012-03-23T12:09:53Z  
    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