Home > database >  [online], such as SQL based on short expected data table, automatic matching need how long material,
[online], such as SQL based on short expected data table, automatic matching need how long material,

Time:11-10

has the following requirements:
1, there are a lot of short aluminum material orders demand, length and the number of different size
2, but the warehouse all wait is 6 meters long aniseed, think, according to the scattered single aluminum sheet A automatic matching with many 6 m long expected to cut, to achieve the most material, waste at least
3, each short expected to reserved 10 mm blade gap, finally get a long expected demand data acquisition table

short expected orders table A (according to "the same material number" and "same length" summary) :
 
A01 (material) how A02 (length) A03 (quantity)
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
LC001 1800 1
LC001 1850 1
LC001 1900 2
LC002 1500 2
LC002 1560 1
,,,


length is 6 m inventory table B:
 
B01 (material) B02 (length)
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
LC001 6000
LC002 6000
LC003 6000
,,,


CodePudding user response:

Also want to know how to make!