tuinkle
02-08-2004, 11:19 AM
Hello,
It's me again :roll: , this time a question regarding MsSQL.
I got this example from a book (which I assumed to be a working example) and modified it a bit according to the database I'm working with, but it gives me a "title_id is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause" in DbVisualiser.
SELECT title_id, count(title_id) AS Number_of_Authors
FROM titleauthor
GROUP BY title_id
HAVING count(title_id) > 1
Does anybody have any clues what went wrong?
I'd appreciate any insights to this.
Thanks very much!
May[/code]
It's me again :roll: , this time a question regarding MsSQL.
I got this example from a book (which I assumed to be a working example) and modified it a bit according to the database I'm working with, but it gives me a "title_id is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause" in DbVisualiser.
SELECT title_id, count(title_id) AS Number_of_Authors
FROM titleauthor
GROUP BY title_id
HAVING count(title_id) > 1
Does anybody have any clues what went wrong?
I'd appreciate any insights to this.
Thanks very much!
May[/code]