Forum Discussion
Dwivedi15
Helper I
1 year agoSyntax issue while connecting SQL server
After doing a direct query on a database : -- POPULATE PROJECT REFERENCE AND TOTAL WATER OFFERED -- WITH WaterOffered AS ( SELECT Project_Reference, SUM(Water_Total_AV) AS Total_Water_Offer...
- 1 year ago
Remove ; at the end of your query
Dwivedi15
Helper I
1 year agoDo you have any idea from where can i check it ?
- Fowmy1 year ago
Super User
Dwivedi15
Connect to the SQL server through SSMS or Azure Data Studio and paste this query and ensure it runs without error, it will highlight the lines where you find errors.- Dwivedi151 year ago
Helper I
I have ran this query in SSMS - no errors - ran successfully there
- Fowmy1 year ago
Super User
Dwivedi15
Try to add a semicolon (;) before WITH WaterOffered AS (
;WITH WaterOffered AS (- Dwivedi151 year ago
Helper I
No not worked -- now its giving this error :
Microsoft SQL: Incorrect syntax near ';'. Incorrect syntax near ')'.