'Are CTE's not allowed in SQLLab?
When running the below in /superset/sqllab/
";WITH cteData AS (
SELECT TOP (100) * FROM [dbo].[Response]
) x
SELECT *
FROM cteData"
I get the following error:
mssql error:(156, b"Incorrect syntax near the keyword 'WITH'.DB-Lib error message 20018, severity 15:\nGeneral SQL Server error: Check messages from the SQL Server\nDB-Lib error message 20018, severity 15:\nGeneral SQL Server error: Check messages from the SQL Server\nDB-Lib error message 20018, severity 15:\nGeneral SQL Server error: Check messages from the SQL Server\nDB-Lib error message 20018, severity 15:\nGeneral SQL Server error: Check messages from the SQL Server\n")
It's clearly unhappy about the WITH part of my CTE, however removing just throws an incorrect syntax error. I have been trying to find other ways to write my queries, to no avail.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|