Reputation: 46222
I have the following select statement which works fine (using SQL Server 2012) :
SELECT distinct(Department) FROM Projects
But when I try the following:
SELECT 'January', distinct(Department) FROM Projects
I get an error message that I could not understand what was next to (
I tried the group by as well but did not seem to work:
SELECT 'January' mm, distinct(Department)
FROM Projects
GROUP BY mm
Upvotes: 0
Views: 110
Reputation: 9645
Try this:
SELECT DISTINCT department, 'January' mm FROM projects
One note: You should uppercase SQL keywords.
Upvotes: 1