Topic
1 reply Latest Post - ‏2013-09-11T11:36:55Z by nivanov1
jared.seaton
jared.seaton
1 Post
ACCEPTED ANSWER

Pinned topic Creating a UDF for MySQL SUBSTRING_INDEX function

‏2013-09-10T17:39:20Z |

I found the code to emulate the functionality of MySQL SUBSTRING_INDEX function in an IBM Redbook, and would like to add this to my DB2 system.

http://www.redbooks.ibm.com/redbooks/pdfs/sg247093.pdf page 432.

I'm not a DBA in any way, but I have to manage the DB2 databases provided with the Tivoli products I use.  I've search a ton, and I'm not really sure how to do this.  I've tried using IBM Data Studio to create the function, but it fails.

Any guidance on how to create this UDF would be greatly appreciated.

 

Thanks.

  • nivanov1
    nivanov1
    231 Posts
    ACCEPTED ANSWER

    Re: Creating a UDF for MySQL SUBSTRING_INDEX function

    ‏2013-09-11T11:36:55Z  in response to jared.seaton

    but it fails

    Fails how exactly? Any error message, by chance, or did it simply destroy your server?

    Anyway, consider using a statement terminator other then the semicolon to end the CREATE FUNCTION statement, then don't forget to set that terminator as the Data Studio SQL Editor option.