I was asked to create function in Transact-SQL which should add numbers in range and show every possible combination. Example:
exec AAA 2,10
result:
1+9
8+2
3+7
4+6
5+5
exec AAA 3,10
result:
7+2+1
5+2+3
4+5+1
I've never done anything like this in SQL is it possible?