your question is vague.
your table names are vague.
But if you mean take the Qty from 1 table and reduce the other, everything is done with queries. Update queries.
use dates as criteria.
in TABLE2 I have
6543G - QTY = 18
in TABLE1 I have (required QTY & dates)
2015.12.13 6543G 5
2015.12.15 6543G 5
2015.12.10 6543G 7
2015.12.10 6543G 5
I need separate my value 18 between required value starting from oldest end show jest possible value (column 4 - 5;1;7;5)
2015.12.13 6543G 5 5 (6 - 5=1)
2015.12.15 6543G 5 1 (1 - 5=-4)
2015.12.10 6543G 7 7 (13 - 7=6)
2015.12.10 6543G 5 5 (18 - 5=13)