Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I didnt quite understand precend load, so why when i run this code it works
ANALISE_FINAL:
LOAD
*
WHERE (ConsumoReal_0 > 0 AND ConsumoReal_1 > 0 AND ConsumoReal_2 > 0) AND (ConsumoReal_0 + ConsumoReal_1 + ConsumoReal_2>0.005);
LOAD
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:
LOAD
*
WHERE (ConsumoReal_0 > 0 AND ConsumoReal_1 > 0 AND ConsumoReal_2 > 0) AND (ConsumoReal_0 + ConsumoReal_1 + ConsumoReal_2>0.005);
LOAD
HORA0,
OID_METER,
ID_LEITURA,
NAME_SYSTEM,
NAME_GROUP,
NEIGHB_SYSTEM,
CITY_SYSTEM,
NAME_TYPE_METER,
NAME_UC,
ADDRESS_BLOCK_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.
Hi mate,
it seems you didnt add those extra fields in the group by clause.
Your load statment should be something like this:
ANALISE_FINAL:
LOAD
*
WHERE (ConsumoReal_0 > 0 AND ConsumoReal_1 > 0 AND ConsumoReal_2 > 0) AND (ConsumoReal_0 + ConsumoReal_1 + ConsumoReal_2>0.005);
LOAD
HORA0,
OID_METER,
ID_LEITURA,
NAME_SYSTEM,
NAME_GROUP,
NEIGHB_SYSTEM,
CITY_SYSTEM,
NAME_TYPE_METER,
NAME_UC,
ADDRESS_BLOCK_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,
ADDRESS_BLOCK_UC
ORDER BY HORA0;
Let me know if this helps.
Kind regards,
Hi mate,
it seems you didnt add those extra fields in the group by clause.
Your load statment should be something like this:
ANALISE_FINAL:
LOAD
*
WHERE (ConsumoReal_0 > 0 AND ConsumoReal_1 > 0 AND ConsumoReal_2 > 0) AND (ConsumoReal_0 + ConsumoReal_1 + ConsumoReal_2>0.005);
LOAD
HORA0,
OID_METER,
ID_LEITURA,
NAME_SYSTEM,
NAME_GROUP,
NEIGHB_SYSTEM,
CITY_SYSTEM,
NAME_TYPE_METER,
NAME_UC,
ADDRESS_BLOCK_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,
ADDRESS_BLOCK_UC
ORDER BY HORA0;
Let me know if this helps.
Kind regards,
......try this ....? did you miss GROUPING non-computing fields ?
......
...
ANALISE_FINAL:
LOAD
*
WHERE (ConsumoReal_0 > 0 AND ConsumoReal_1 > 0 AND ConsumoReal_2 > 0) AND (ConsumoReal_0 + ConsumoReal_1 + ConsumoReal_2>0.005);
LOAD
HORA0,
OID_METER,
ID_LEITURA,
NAME_SYSTEM,
NAME_GROUP,
NEIGHB_SYSTEM,
CITY_SYSTEM,
NAME_TYPE_METER,
NAME_UC,
ADDRESS_BLOCK_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;
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,
ADDRESS_BLOCK_UC,
Something like
ANALISE_FINAL:
LOAD
*
WHERE (ConsumoReal_0 > 0 AND ConsumoReal_1 > 0 AND ConsumoReal_2 > 0) AND (ConsumoReal_0 + ConsumoReal_1 + ConsumoReal_2>0.005);
LOAD
HORA0,
OID_METER,
ID_LEITURA,
NAME_SYSTEM,
NAME_GROUP,
NEIGHB_SYSTEM,
CITY_SYSTEM,
NAME_TYPE_METER,
NAME_UC,
ADDRESS_BLOCK_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,
ADDRESS_BLOCK_UC
ORDER BY HORA0;
Regards!
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