tengo la siguiente consulta:
Código SQL:
Pero me da un error:Ver original
SELECT * FROM WAGERHEADER H, WAGERDETAIL D, GAME G WHERE H.[IdWager] = D.[IdWager] AND D.[IdGame] = G.[IdGame] AND H.[SettledDate] >= CONVERT(datetime,('2014-01-08 00:00:00')) AND H.[SettledDate] <= CONVERT(datetime,('2014-01-09 00:00:00')) AND H.[IdAgent] = 7 GROUP BY H.[IdWager] ORDER BY H.[IdWager] DESC
Column 'WAGERHEADER.IdLineType' is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause.
Saben a que se puede deber ese error ?