January 3rd, 2011, 04:40 AM
Problem on query
I try to run the following query in firebird
I get the following error code :
Actually this query runs without any problem (or i think so) in MySQL.
So, how I can fix the problem to have it work in firebird?
January 4th, 2011, 01:35 AM
I think the problem is here :
left join ( select id,client_id, sum(grand_sum*(100-disc_prcnt)/100) as sumfa from inv_header where inv_type in (1,2,3,4,5,6,7,8,9,10) group by client_id, id ) as iha on c.id=iha.client_id
You have more that one place the problem above.
All fields that are not contained in either an aggregate function must be contained by GROUP BY clause.