Results 1 to 3 of 3

Thread: string parsing

  1. #1
    Join Date
    Aug 2003
    Posts
    14

    Unanswered: string parsing

    I have a string having name,value pairs. I want to parse this string and store it in a table. How to do this using Informix SQL?

    String looks like this.
    A1=aa1 A2=aa2 A3=aa3.

    From this string I want to take out all A's and aa's and store them in a table. Like this

    Table A
    Name Value
    ------ -------
    A1 aa1
    A2 aa2
    A3 aa3

    Is it possible to do this in Informix SQL? Please help.

    THanks,
    Gopal

  2. #2
    Join Date
    Aug 2002
    Location
    Belgium
    Posts
    534
    If it has a fixed position, use String[1,2] etc...
    rws

  3. #3
    Join Date
    Aug 2002
    Location
    Belgium
    Posts
    534
    The cleanest implementation would be to create a UDT for this type. You could create the appropriate functions to split the UDT into different types.

    You also might want to check this site:
    http://www7b.boulder.ibm.com/dmdd/zo...downloads.html

    Lots of bladelets are available here. It is possible you find your solution in there.
    rws

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •