Thanks, Dave - I barely use Oracle, but knowing that is bound to save
me some research next time I do!

-Joe

On 5/23/05, Dave Carabetta <[EMAIL PROTECTED]> wrote:
> On 5/23/05, Joe Rinehart <[EMAIL PROTECTED]> wrote:
> > Also, if you're using MS SQL server, try doing ewok's query using the
> > WITH ROLLUP option...by using it with proper grouping, you can have
> > the server get the by-purchaser and overall totals in the query
> > itself.  May have to add a column or two to control ordering of NULL
> > values, but, hey, it's MS...
> >
> >
> > SELECT purchaserid, itemid, sum(itemPrice) as TheTotal
> > FROM itemsPurchased
> > GROUP BY purchaserid, itemid
> > WITH ROLLUP
> >
> 
> And Oracle has the equivalent analytical functions (which have saved
> me tons of coding/hacking).
> 
> SELECT purchaserid, itemid, sum(itemPrice) as TheTotal
> FROM itemsPurchased
> GROUP BY ROLLUP ( purchaserid, itemid )
> 
> Regards,
> Dave.
> 
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:207418
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to