Hi Guys
I need to do display the total number of matching records from the script below:
So, if I have 14 Aston Martins in my database then it would simpy display "14". I have tried ......
but I get a " Column 'make' is invalid in the select
list because it is not contained in either an aggregate function or the GROUP
BY clause" error.
Any help would be fully appreciated
Best regards
Rod from the UK
I need to do display the total number of matching records from the script below:
Code:
sSQL = "SELECT make, model, description, colour, price FROM MyTable" sSQL = sSQL & " WHERE make = 'Aston Martin'" sSQL = sSQL & " AND model = 'DB7'"
Code:
sSQL = "SELECT make, COUNT(make) AS Total, model, description, colour, price FROM MyTable" sSQL = sSQL & " WHERE make = 'Aston Martin'" sSQL = sSQL & " AND model = 'DB7'"
list because it is not contained in either an aggregate function or the GROUP
BY clause" error.
Any help would be fully appreciated
Best regards
Rod from the UK
Comment