I can not find in the SAPDB documentation any information about CASE
statement.  If SAPDB does not support CASE statement, is there any
workaround if I want to do:

select
        100.00 * sum(case
                when p_type like 'PROMO%'
                        then l_extendedprice * (1 - l_discount)
                else 0
        end) / sum(l_extendedprice * (1 - l_discount)) as promo_revenue
from
        lineitem,
        part
where
        l_partkey = p_partkey
        and l_shipdate >= '1997-02-01'
        and l_shipdate < '1997-03-01'

Thanks in advance,
Jenny
-- 
Jenny Zhang
Open Source Development Lab Inc 
15275 SW Koll Parkway - Suite H
Beaverton, OR 97006
(503)626-2455 ext 31

_______________________________________________
sapdb.general mailing list
[EMAIL PROTECTED]
http://listserv.sap.com/mailman/listinfo/sapdb.general

Reply via email to