4 Replies Latest reply: Dec 14, 2016 1:47 PM by Eduardo DImperio

Hi,

I didnt quite understand precend load, so why when i run this code it works

ANALISE_FINAL:

*

WHERE (ConsumoReal_0 > 0 AND ConsumoReal_1 > 0 AND ConsumoReal_2 > 0) AND (ConsumoReal_0 + ConsumoReal_1 + ConsumoReal_2>0.005);

HORA0,

OID_METER,

Sum(CONSUMODIA0)AS ConsumoReal_0,

Sum(CONSUMODIA1)AS ConsumoReal_1,

Sum(CONSUMODIA2)AS ConsumoReal_2

RESIDENT ANALISE

GROUP BY OID_METER,HORA0

ORDER BY HORA0;

and when i run this i receive this erros messagem:

ANALISE_FINAL:

*

WHERE (ConsumoReal_0 > 0 AND ConsumoReal_1 > 0 AND ConsumoReal_2 > 0) AND (ConsumoReal_0 + ConsumoReal_1 + ConsumoReal_2>0.005);

HORA0,

OID_METER,

ID_LEITURA,

NAME_SYSTEM,

NAME_GROUP,

NEIGHB_SYSTEM,

CITY_SYSTEM,

NAME_TYPE_METER,

NAME_UC,

Sum(CONSUMODIA0)AS ConsumoReal_0,

Sum(CONSUMODIA1)AS ConsumoReal_1,

Sum(CONSUMODIA2)AS ConsumoReal_2

RESIDENT ANALISE

GROUP BY OID_METER,HORA0

ORDER BY HORA0;

Ocorreram os seguintes erros:

Unknown error

O erro ocorreu aqui:

ANALISE_FINAL: LOAD * WHERE (ConsumoReal_0 > 0 AND ConsumoReal_1 > 0 AND ConsumoReal_2 > 0) AND (ConsumoReal_0 + ConsumoReal_1 + ConsumoReal_2>0.005)

I just put more variables, the logic i think still remains.

• ###### Re: Preceding Load Error

Hi mate,

it seems you didnt add those extra fields in the group by clause.

ANALISE_FINAL:

*

WHERE (ConsumoReal_0 > 0 AND ConsumoReal_1 > 0 AND ConsumoReal_2 > 0) AND (ConsumoReal_0 + ConsumoReal_1 + ConsumoReal_2>0.005);

HORA0,

OID_METER,

ID_LEITURA,

NAME_SYSTEM,

NAME_GROUP,

NEIGHB_SYSTEM,

CITY_SYSTEM,

NAME_TYPE_METER,

NAME_UC,

Sum(CONSUMODIA0)AS ConsumoReal_0,

Sum(CONSUMODIA1)AS ConsumoReal_1,

Sum(CONSUMODIA2)AS ConsumoReal_2

RESIDENT ANALISE

GROUP BY OID_METER,

HORA0,

D_LEITURA,

NAME_SYSTEM,

NAME_GROUP,

NEIGHB_SYSTEM,

CITY_SYSTEM,

NAME_TYPE_METER,

NAME_UC,

ORDER BY HORA0;

Let me know if this helps.

Kind regards,

• ###### Re: Preceding Load Error

......try this ....? did you miss GROUPING  non-computing fields ?

......

...

ANALISE_FINAL:

*

WHERE (ConsumoReal_0 > 0 AND ConsumoReal_1 > 0 AND ConsumoReal_2 > 0) AND (ConsumoReal_0 + ConsumoReal_1 + ConsumoReal_2>0.005);

HORA0,

OID_METER,

ID_LEITURA,

NAME_SYSTEM,

NAME_GROUP,

NEIGHB_SYSTEM,

CITY_SYSTEM,

NAME_TYPE_METER,

NAME_UC,

Sum(CONSUMODIA0)AS ConsumoReal_0,

Sum(CONSUMODIA1)AS ConsumoReal_1,

Sum(CONSUMODIA2)AS ConsumoReal_2

RESIDENT ANALISE

GROUP BY OID_METER,HORA0,ID_LEITURA, NAME_SYSTEM, CITY_SYSTEM, NAME_TYPE_METER,  NAME_UC,DDRESS_BLOCK_UC,

ORDER BY HORA0;

• ###### Re: Preceding Load Error

Hello Eduardo

You are aggregating the fields CONSUMODIA0, 1 y 2, so, you should add the new variables to the Group By sentence (

ID_LEITURA,

NAME_SYSTEM,

NAME_GROUP,

NEIGHB_SYSTEM,

CITY_SYSTEM,

NAME_TYPE_METER,

NAME_UC,

Something like

ANALISE_FINAL:

*

WHERE (ConsumoReal_0 > 0 AND ConsumoReal_1 > 0 AND ConsumoReal_2 > 0) AND (ConsumoReal_0 + ConsumoReal_1 + ConsumoReal_2>0.005);

HORA0,

OID_METER,

ID_LEITURA,

NAME_SYSTEM,

NAME_GROUP,

NEIGHB_SYSTEM,

CITY_SYSTEM,

NAME_TYPE_METER,

NAME_UC,

Sum(CONSUMODIA0)AS ConsumoReal_0,

Sum(CONSUMODIA1)AS ConsumoReal_1,

Sum(CONSUMODIA2)AS ConsumoReal_2

RESIDENT ANALISE

GROUP BY OID_METER,HORA0,

ID_LEITURA,

NAME_SYSTEM,

NAME_GROUP,

NEIGHB_SYSTEM,

CITY_SYSTEM,

NAME_TYPE_METER,

NAME_UC,

ORDER BY HORA0;

Regards!

• ###### Re: Preceding Load Error

Hi everyone,

Thanks for the help, when i saw unknown error following by preceding load code part i didnt pay attention in rest of code but this.

Problem solve