Subject | [ib-support] Re: Group by problem... |
---|---|
Author | Svein Erling Tysvaer |
Post date | 2003-05-27T06:38:10Z |
Johan,
you desire something that doesn't make sense. If some rows contain
ALARM_GRP = 'Yes' and others ALARM_GRP = 'No', then which of these values
should be returned if you don't want them included in the group by? If it
is irrelevant, then you could turn that field into an aggregate field -
e.g. by using MAX(ALARM_GRP).
Set
-oops, I think I just tried to help a Swede...
At 20:43 26.05.2003 +0000, you wrote:
you desire something that doesn't make sense. If some rows contain
ALARM_GRP = 'Yes' and others ALARM_GRP = 'No', then which of these values
should be returned if you don't want them included in the group by? If it
is irrelevant, then you could turn that field into an aggregate field -
e.g. by using MAX(ALARM_GRP).
Set
-oops, I think I just tried to help a Swede...
At 20:43 26.05.2003 +0000, you wrote:
>The table SG_CURRENT holds a record created every 15 minute. Every
>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).
>
>Therefore I need the grouping to work on the SG_CURRENT.OBJ_DATA
>field. Makes it easier without the DISTINCT or not?
>
>If I skip the ALARM_GRP field it's OK but then I need to find
>another solution to add that later on...
>
>Maybe thats the easiest way?