I have created a query in design view which has generated this SQL:
SELECT [ACD-C-DataSourceExport].Field2
FROM [ACD-C-DataSourceExport]
GROUP BY [ACD-C-DataSourceExport].Field2
HAVING ((([ACD-C-DataSourceExport].Field2) Like "2313*"));
This works fine and returns all 265 records bginning 2313
However if I change (in design view) from Group by to Count to produce this SQL, it returns nothing, just a blank result:
SELECT Count([ACD-C-DataSourceExport].Field2) AS CountOfField2
FROM [ACD-C-DataSourceExport]
HAVING (((Count([ACD-C-DataSourceExport].Field2)) Like "2313*"));
I thought it would return 265 (ie the number of records that match the criteria
Can anyone suggest what I am doing wrong?
Thank you
Ian
SELECT [ACD-C-DataSourceExport].Field2
FROM [ACD-C-DataSourceExport]
GROUP BY [ACD-C-DataSourceExport].Field2
HAVING ((([ACD-C-DataSourceExport].Field2) Like "2313*"));
This works fine and returns all 265 records bginning 2313
However if I change (in design view) from Group by to Count to produce this SQL, it returns nothing, just a blank result:
SELECT Count([ACD-C-DataSourceExport].Field2) AS CountOfField2
FROM [ACD-C-DataSourceExport]
HAVING (((Count([ACD-C-DataSourceExport].Field2)) Like "2313*"));
I thought it would return 265 (ie the number of records that match the criteria
Can anyone suggest what I am doing wrong?
Thank you
Ian