[thelist] SQL to get combo that sums to amount

aspscript at canada.com aspscript at canada.com
Thu Sep 9 06:45:44 CDT 2004


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