-
Notifications
You must be signed in to change notification settings - Fork 13.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DISTINCT command error Incorrect syntax near the keyword on SQLLab when connect MSSQL database #21027
Comments
I get this behavior too, Superset 2.0.0 connecting to MSSQL. |
Same, any news? |
same here. Problem is with both pymssql and with pyodbc. It looks like this is due to the insertion of top 1000 by SQL Lab, as this syntax (top 1000 distinct) isn't valid for sql server? I ended up using a cte for my actual query with a select * from cte wrapper as a workaround |
Nice sleuthing. I wonder if this can be accommodated on the Superset side. It looks like |
An idea: modify superset/superset/db_engine_specs/base.py Lines 897 to 903 in b2b8c3e
Then in |
When connect to MSSQL database cannot use DISTINCT command. SQLLab shows mssql error: 156, b"Incorrect syntax near the keyword 'DISTINCT'
How to reproduce the bug
Expected results
Get data result of unique value normally
Actual results
Get this following error:
Screenshots
Environment
(please complete the following information):
Checklist
Make sure to follow these steps before submitting your issue - thank you!
Additional context
The text was updated successfully, but these errors were encountered: