Quantcast
Channel: Transact-SQL forum
Viewing all articles
Browse latest Browse all 23857

Query that provides combination of data that meet a certain criteria

$
0
0

I am trying to find a combination of rows that combine to meet a criteria.

I have a table with columns Length , Width and No of pieces. Each row represents one rectangular piece and its quantity.

The entries are like 30060030

                                40030010............etc.

I want the user to give input like necessary rectangular length = 1000 and necessary rectangular width = 500 and the query can give me all possible combinations from available rectangular pieces that combine to form this necessary rectangle and if not, print an error.

If a code is required instead of query (which i think it is) please advice the code and how to attach a code to Microsoft access file as an addin.

Thanks


Viewing all articles
Browse latest Browse all 23857

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>