:) know the feeling, jim...i completely overlooked the distinct, left out a comma between the fields, and left out the table name even though it was right there...lol. all of this snow up here must be affecting my brain cells...all 2 of them. oh, well, at least terry got some valuable feedback on the use of "group by" and "having."
On 12/3/06, Jim Wright <[EMAIL PROTECTED]> wrote: > > Jim Wright wrote: > > SELECT inventory.ItemNumber, SUM(inventory.qty) as > > invqty > > FROM inventory > > GROUP BY inventory.ItemNumber > > HAVING SUM(inventory.qty) > 0 > > > > oops...told you to take the DISTINCT out, and then left it in...see above. > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:262662 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4