Select Sum(..) etc

Ruslan Zasukhin sunshine at public.kherson.ua
Fri Feb 21 10:01:01 CST 2003


on 2/21/03 5:52 PM, Barney at barney at custombased.com wrote:

> Hi,
> 
> Is it not allowed to have a WHERE clause in a Select statement that includes
> Sum(...) ?
> 
> This statement won't work for me ?
> 
> P2cur = window1.db.sqlSelect("select
> 
> SUM(Cost),SUM(OBV),SUM(SalePrice),Sum(DeprRec),Sum(capgain) from reportData
> 
> where description <> 'Sub Summary' ")
> 
> I am trying to get a sum of everything in the table except for the records
> which have "Sub Summary" written into their description field.

No this not works.

In Standard this can be resolved if SubSummary is sub-query.

You can try do this now using 2 different queries,

-- 
Best regards,
Ruslan Zasukhin      [ I feel the need...the need for speed ]
-------------------------------------------------------------
e-mail: ruslan at paradigmasoft.com
web: http://www.paradigmasoft.com

To subscribe to the Valentina mail list go to:
http://listserv.macserve.net/mailman/listinfo/valentina
-------------------------------------------------------------



More information about the Valentina mailing list