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

From: Totti <saliba.toufic.george_at_gmail.com>
Date: Sun, 6 Jan 2008 10:34:57 -0800 (PST)
Message-ID: <5a842783-4cb3-4204-a5c2-675be98079fc@f3g2000hsg.googlegroups.com>


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 Received on Sun Jan 06 2008 - 12:34:57 CST

Original text of this message