I'm using your query tool as part of a package we bought from another company. I've been trying to modify the SQL statement in the Advanced pages but I can't seem to get my SQL statement to work. I'm looking to get the Max, Avg and Sum functions working but end up with a Var2 missing error message (I can't remember the exact message, dev machine is in work). An example of my SQL string is:
select Table1.Var1, max(Table2.Var2) from Table1 inner join Table2 on Table1.Var1 = Table2.Var1 group by Table1.Var1 order by Table1.Var1
This string works for me in SQL Server 2005 but gives me the error in your query tool. If I remove the max() function and the group by condition then the query runs. The problem is the same whether I use max(), avg() or sum().
Is there a way around this or am I doing something wrong?
Thanks in advance. |