I get the error:
Column 'dbo.Saved_ORDER_IMPORT.Company' is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause.
When i execute :
SELECT [Order No], Company
FROM [dbo].[Saved_ORDER_IMPORT]
where [sent] = 1 and datesent between '01/01/2009' and '01/27/2012'
group by [Order No]
do i have to change the column or my query?
Description:
You can’t group your query by only one column because you select 2.
We need more information but maybe this helps
Sample:
More information: