The other problem is that some SQL products do not allow you to shorten a column, but only to widen it. Some products are picky about changing numeric data types, too. Okay, this gets the DDL pretty well under way. Phase two will look at the embedded SQL in the programs. Changing the data types might make some problems for the host programs.
Detective work can be dirty.
You have a quoted string made up of integers separated by commas, and your goal is to break each integer out as a row in a table. The obvious approach is to write procedural code that will loop over the input string and cut off all characters from the start up to but including the first comma in each iteration. One way to do this is with an auxiliary table of sequential numbers and this strange looking query. In effect, the sequence table replaces the loop counter. The Sequence table has to have enough numbers to cover the entire string, but unless you really like to type in long parameter lists, this requirement should not be a problem.