Couldn't you just add (to) a WHERE :

Either in your VIEW-statement :

WHERE ...
btu_inj > (0)
but_with > (0)

Or to your SELECT-statment :

WHERE ...
btu_inj > (0)
but_with > (0)

Depending on whether you want the 0-values excluded at the point of the VIEW
or at the point of the SELECT result-set?

Am I missing something or could it be so done?  If not, I think there are
other approaches, but I'd to hear more about your requirements and maybe a
small block of relevant test data ...

Thanks,
Steve in Memphis

----- Original Message ----- 
From: <[EMAIL PROTECTED]>
To: "RBASE-L Mailing List" <[EMAIL PROTECTED]>
Sent: Thursday, September 18, 2003 2:25 PM
Subject: [RBASE-L] - RBW6.5++: How to ignore zero?


>
> Is there a way to get the MIN, MAX, and AVG while ignoring zero values?
Ie,
> getting the minimum non-zero value..
>
> I have a view setup and a select that groups my data by month and year
with
> the min max and avg of some btu values; however I am not interested in the
> zeroes!
>
> I know this ignoring of zero can be done in Excel but it is easier to do
the
> grouping in Rbase..
>
> Here's my view:
> --------------------
> CREATE VIEW minmax5 +
> (yr_month,btu_inj,btu_with) AS  +
> select ( (ctxt( (iyr(gasday)))) + '/' + (ctxt( (im+
> on(gasday)))) ) btu_with btu_inj from daily_data g+
> roup by #1 btu_inj btu_with
>
>
> Here's my current select:
> -------------------------
> select #1=10 (avg(btu_inj)) (min(btu_inj))=10 (max(btu_inj))=10
> (avg(btu_with))=10 (min(btu_with))=10 (max(btu_with))=10 from +
> minmax5 group by #1
>
> Thanks!
> Charley
>
>
> Charles Sikora
> Coordinator, Gas Storage
> Manlove Field
> Peoples Energy Corporation
> (217)-897-7123
>

Reply via email to