A query to find the best matched group
I have got a really complext query to write.
I have got an ITEM table that contains items with different price and I have to find the items from the table that makes up an order of particular amount.
Now when order amount is 2 it should return item 1 & 2.
when order amount is 1.15, it should return item 3
when order amount is 1.20, it should return item 4
when order amount is 2.15, it should return item 2 & 3
when order amount is 3.35, it should return item 2, 3 & 4.
Order amount can be anything. Any help would be highly appreciated.
Tags for this Thread
DatabaseJournal Recent Articles
Executing SSIS Packages Using DTExec
What Every DBA Ought to Know About SQL Ser...
Redmond exploits MySQL uncertainty
Oracle Launches Oracle Global Trade Manage...
SQL Server 2008 RTM Support Ends April 13,...