Re: how can i put multiple statmwnts in sum(case...

From: DA Morgan <damorgan_at_psoug.org>
Date: Sun, 06 Jan 2008 13:21:47 -0800
Message-ID: <1199654479.840875@bubbleator.drizzle.com>


Totti wrote:
> as Charles pointed, i used the decode function as an if statement and
> this solved my problem just like that:
>
> sum(decode(cust_1.region, 'East', decode(prod_1.category, 'Base',
> 0.095,'Common', 0.115,
> 'Special',0.14, 0)*salpmt_1.amount, 0)) as "East", ...
>
> that was it.
> Thanks to all of you, you were all helpful

Well done Charles. I was still trying to figure out what the question was.

-- 
Daniel A. Morgan
Oracle Ace Director & Instructor
University of Washington
damorgan_at_x.washington.edu (replace x with u to respond)
Puget Sound Oracle Users Group
www.psoug.org
Received on Sun Jan 06 2008 - 15:21:47 CST

Original text of this message