EASOL / easol

EASOL - A New Way to Open Learning with Ed-Tech
http://easol.org
GNU Affero General Public License v3.0
1 stars 4 forks source link

Flex Report with SQL that has last line commented out isn't handled properly #254

Closed jamessun closed 8 years ago

jamessun commented 8 years ago

Steps to reproduce:

  1. Visit http://easol-dev-staging.azurewebsites.net/reports/view/29 to view the results of a predefined query (or create a new Flex Report with the SQL listed below)
SELECT StudentUSI
FROM edfi.Student /* Comment */
WHERE Student.LastSurname LIKE 'S%' -- Comment
-- AND Student.Firstname LIKE 'S%'

I get the following error:

Error Number: 42000/102

[Microsoft][ODBC Driver 11 for SQL Server][SQL Server]Incorrect syntax near 'S%'.

SELECT count() as tot FROM (SELECT StudentUSI FROM edfi.Student / Comment */ WHERE Student.LastSurname LIKE 'S%' -- Comment -- AND Student.Firstname LIKE 'S%') as b

Filename: D:/home/site/wwwroot/application/widgets/DataTableWidget/DataTableWidget.php

Line Number: 152

Looks like the issue is the final line in the SQL which is commented out.

jamessun commented 8 years ago

This seems to work fine in EASOL-dev.

Flex Report CommandText is:

SELECT StudentUSI
FROM edfi.Student /* Comment */
WHERE Student.LastSurname LIKE 'S%' -- Comment
-- AND Student.Firstname LIKE 'S%'

See http://easol-dev.azurewebsites.net/reports/view/57

edgarf commented 8 years ago

Good, I assume we can close it, right?