I'm getting this sql script error: Our SQL technical says that there should not be any "," before WHERE in this script. How and Where to change it ?

System Error Detected: Database error

SQLExecDirect failed with [[ODBC Error: state=42000, nativeErr=156, err=[Microsoft][ODBC Driver 13 for SQL Server][SQL Server]Incorrect syntax near the keyword 'WHERE'.]

[ODBC - no error records. htype=2, h=07513200] , ret=-1] for SQL=[SET NOCOUNT ON;SELECT ux.UserName, COUNT() FROM FileSightFindings fsf LEFT JOIN FileSightFindingsExtra fsfx ON fsf.ExtraInfoKey = fsfx.ExtraInfoKey LEFT JOIN FileSightUsers AS ux ON fsf.UserID = ux.UserID, WHERE fsf.EventTime >= {ts N'2017-11-20 23:00:00' } AND fsf.EventTime <= {ts N'2017-11-28 22:59:59' } AND fsf.Change in (N'Read',N'Moved') AND fsfx.ProbableCopy = 1 GROUP BY ux.UserName HAVING COUNT() > 10 ORDER BY COUNT(*) DESC;]

asked 28 Nov '17, 05:32

greensky's gravatar image

accept rate: 0%

Hi greensky,

Thank you for bring the error to our attention. A fix has been put in the preview version and is ready for you to install.



Please make sure to mark your questions accepted when you have your answer by clicking the gray check mark to the left of the answer.


answered 28 Nov '17, 17:37

Quinn's gravatar image

Quinn ♦♦
accept rate: 36%

Good work, no problem after upgrade.


answered 29 Nov '17, 03:18

greensky's gravatar image

accept rate: 0%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: 28 Nov '17, 05:32

Seen: 1,337 times

Last updated: 29 Nov '17, 03:18

Related questions