Re: summing syntax

From: Michel Cadot <micadot{at}altern{dot}org>
Date: Fri, 25 Sep 2009 06:39:20 +0200
Message-ID: <4abc4978$0$1524$426a74cc_at_news.free.fr>


"Brock" <wade.brock_at_yahoo.com> a écrit dans le message de news: 0e3ceda7-aa52-4f45-80e2-f7a3c470e132_at_q14g2000vbi.googlegroups.com...
| Thanks in advance for any clues! I'm trying to edit an existing stored
| procedure in Oracle and need to know how to code using SUM in this
| scenario:
|
|
| SELECT
|
| TableA.FieldA, //character
| TableA.FieldB //number
|
| Pseudocode: If FieldA = 'Virginia' then add that record's FieldB to
| running total
| then running total = TotalReturns
| FROM
| WHERE
sum(decode(fielda,'Virginia',fieldb))

Regards
Michel Received on Thu Sep 24 2009 - 23:39:20 CDT

Original text of this message