I have 2 tables:
1 is combinations of oil and water (example). I need to match this to a container which can hold it.
Table1
ID Oil Water 1 4 7 2 1 3 3 12 45
in another table I have a list of containers with how much oil and water they can contain.
Table2
Container Name Oil Water Cont1 16 32 Cont2 4 8 Cont3 32 64 Cont4 2 2
I need to match each row in Table 1 with the most efficient container (should return container name) to hold the oil and water. everything will fit in Cont3, but that would leave a lot of dead space in that Container. so it needs to match to the closest possible without overflowing the container. Also each container can only hold so much water and so much oil. so Table1:id3 should only match to Cont3 because of the water requirement. make sense? think of each container as having a divider in them... so only 1 section can hold a finite amount of oil and the other a finite amount of water. one cant overflow to the other.
Thoughts on doing this formula based?
Bookmarks