[thelist] query help (ms sql 2000)

Brian Cummiskey brian at hondaswap.com
Fri Jan 12 08:53:59 CST 2007

Matt Warden wrote:
> <SNIP>
> Untested:

Thanks, but that's not what I'm stuck on.  Perhaps I wasn't specific 
enough in my orig. posting.

That will give me rows (in this case, 4 with non-0 entries) with 
qty/price pairings based on item number.

What I need is the end result of 2 returned rows, grouped on price, but 
not on qty.

I've come to the conclusion that this cannot be done in sql server 
(without frontside scripting of those said 4 rows), due to having to 
also group by on qty along with price, thus not giving me the proper 
groupings i need for display.   Confirmed by Rudy on sitepoint as well. 

So, now i'm in asp loop hell, trying to account for all 9 cases of 
whether price(0) = price(1) and if so does price(1) = price(2) 
......     and that needs to be done 9 times...   fun is.  heh

More information about the thelist mailing list