This topic is locked

Chart issue

2/22/2010 4:48:42 AM
PHPRunner General questions
A
aramuni author

Hi,
Someone knows why a field (Nome) of a joined table don't appears in the list box on the chart parameters windows?
SELECT

Tlm01.IMEI,

Motorista.Nome AS Nome,

SUM(Sen_Analogico) AS PontuacaoTotal

FROM Tlm01

INNER JOIN Motorista ON Tlm01.Motorista = Motorista.id

GROUP BY Tlm01.Motorista
Tks!

Sergey Kornilov admin 2/22/2010

Your SQL query is incorrect.
In GROUP BY queries all fields in the list either need to be GROUP BY fields or be a result of aggregation function like SUM or MAX. You cannot simply add fields like Nome to GROUP BY query.
More info: http://www.webcheatsheet.com/sql/interactive_sql_tutorial/sql_groupby.php

A
aramuni author 2/22/2010

I don't think so... The query works. See the result:
"IMEI" "Nome" "PontuacaoTotal"

"20031658" "NI" "0"

"20113258" "JoaoS" "0"

"760006334" "Claudio" "0"
Anyway, how I make the joined name in an chart?
Tks again...

Sergey Kornilov admin 2/22/2010

I recommend to contact support directly sending your project file and database for investigation.