KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
This is my query. SELECT CONVERT(varchar, cast(date as datetime), 3) FROM shoptransfer GROUP BY year (date) I want to group by the year part of the date ( varchar ) column, however I get the following error: Column 'shoptransfer.Date' is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause. How do I group by the year part of the date column?
Tags (comma-separated)
Save Edits
Cancel