Subject | Re: [ib-support] Re: Group by problem... |
---|---|
Author | Daniel Rail |
Post date | 2003-05-26T22:11:12Z |
Hi,
At May 26, 2003, 17:43, johanfredse wrote:
standard as well. If using aggregated fields, then all non-aggregated
fields have to be included in the GROUP BY clause. Otherwise, the
resulting data can be unpredictable.
this for you.
--
Best regards,
Daniel Rail
Senior System Engineer
ACCRA Group Inc. (www.accra.ca)
ACCRA Med Software Inc. (www.filopto.com)
At May 26, 2003, 17:43, johanfredse wrote:
> The table SG_CURRENT holds a record created every 15 minute. EveryUnfortunately, what Svend wrote is correct. And, that is the SQL
> 24 hour it should be summed together into SG_HISTORY. The problem
> with grouping on all the fields is that the SG_CURRENT.ALARM_GRP
> field might have changed in mean time but should be ignored. The
> field is needed when presenting the summed data (selecting color
> codes).
standard as well. If using aggregated fields, then all non-aggregated
fields have to be included in the GROUP BY clause. Otherwise, the
resulting data can be unpredictable.
> Therefore I need the grouping to work on the SG_CURRENT.OBJ_DATAThe DISTINCT is not required, since the GROUP BY will take care of
> field. Makes it easier without the DISTINCT or not?
this for you.
> If I skip the ALARM_GRP field it's OK but then I need to findHave you considered creating a stored procedure?
> another solution to add that later on...
--
Best regards,
Daniel Rail
Senior System Engineer
ACCRA Group Inc. (www.accra.ca)
ACCRA Med Software Inc. (www.filopto.com)