Hi All,
I am trying to solve a balancing problem in my application.
need to come up with PLSQL programs which find outs numbers which sums up to a target number.
I have 4000 rows of numbers and have to come up with the rows which sums up to a target number.
for eg ..
select NUMBERS from table1
and result of select is as below .
1.00
2.00
3.00
4.00
5.00
6.00
7.00
8.00
9.00
10.00
lets say my target number is 5 ..
once I input the above results into PLSQL program
the result/ dbms should come up as
your possible number can be
2.00+ 3 .00
1.00 +4.00
this has been discussed over internet in M S Excel forums and using a solver add ons , but i am trying to see if we have PLSQL way of finding this out using loops.
the numbers can be positive or negative but it always be the sum which we will be doing.