We are using sql anywhere 12 We often get data provided to us for conversion to the database where they have text fields which contain comma separated values. Other than writing a application program to parse these out, is there any SQL that can parse a comma separated value into multiple rows a another table with reference to the source key. If not in SA 12 - is there functionality in SA16? asked 15 Oct '13, 14:14 Glenn Barber |
Have a look at sa_split_list. The second parameter allows you to specify the delimiter - the default is a comma. Example:
gives this result set: line_num row_value 1 one 2 two 3 three sa_split_list has existed since answered 15 Oct '13, 14:28 Mark Culp Replies hidden
2
Hmmm, looks like you are correct - see the What's New in version 10.0.0. I guess I was using it for many years before it became part of the product ;-)
(15 Oct '13, 15:22)
Mark Culp
|