I have a delimited string of values like such: 00,45,50,66,84,99. This string is passed as an IN parameter to a DB2 stored procedure. In the procedure, I would like to loop through this string and insert each value into a temp table. My knowledge of DB2 looping syntax is very poor and I have been struggling with this for awhile. Any help would be much appreciated, thank you!
I have a delimited string of values like such: 00,45,50,66,84,99. This string is passed
Share
You can define a recursive SP that takes the IN varchar, processes the first element, and do a recursive call for the rest.
To make it work from db2clp: