Question : how to write PL/SQL function

How to do a pl/sql function that takes two strings representing a list of
numbers separated by commas and returns a string representing the list
of each nth element added together.  You don't know how long the list
will be, but assume it has to fit in a PL/SQL varchar2.

So,

      add_nums('1,2,3,4','3,4,5,6') -> '4,6,8,10'
      add_nums('1,2,3','15,14,13') -> '16,16,16'

It should fail gracefully when the lengths of the two lists are not
equal.

Answer : how to write PL/SQL function

See attached.
 
Function returns null if number of elements do not match.
 
Random Solutions  
 
programming4us programming4us