[thelist] SQL to get combo that sums to amount

Ken Schaefer ken.schaefer at gmail.com
Thu Sep 9 08:02:35 CDT 2004


And what happens if you have 20 combinations that total 50?

Cheers
Ken


On Thu, 09 Sep 2004 04:45:44 -0700 (PDT), aspscript at canada.com
<aspscript at canada.com> wrote:
> What I'm trying to do is simulate a "stock market"
> where a user places an order for a certain number of
> shares.  For example, if a user places an order to to
> buy 50 then I need to go thru and search to see if
> there is any combination of sell orders that adds to 50
> to complete the order.  So I only need to find one
> combination of records that meets this criteria and
> then I could change the status of those records.
> 
> On Wed, 8 Sep 2004 23:49:08 -0400, Chris Johnston wrote:
> 
> <SNIP>
> 
> 
> 
> >
> > Exactly what are trying to do here and what is the
> > logic behind it?
> >
> > --
> > chris johnston
> >
> > www.fuzzylizard.com


More information about the thelist mailing list