Link to home
Start Free TrialLog in
Avatar of colonelblue
colonelblue

asked on

SQL statement won't let add a WHERE. Get an error: Incorrect Syntax Near the Keyword WHERE

SELECT MONTH(start) AS 'Month', location, ID, Event,[Start], [End]
FROM dbo.vw_Events Group By Month(start), location, ID, Event, [Start],[End]
ORDER BY [Start] ASC

When ever I try to add a WHERE, I get an error.

Thanks in advance Experts.
SOLUTION
Avatar of tobyweston
tobyweston

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Avatar of Kyle Abrahams, PMP
Kyle Abrahams, PMP
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
what is the code of vw_Events?
What does the statment that gives you the error look like?
Avatar of colonelblue
colonelblue

ASKER

Thank you Experts.<br />I was putting the WHERE after the group and not before as tobyweston and ged325<br />pointed put.<br /><br />You guys rock!