Forum Discussion
michaeljc70
10 years agoAdvocate II
Query with CTE gives error
I used SQL Server and a query that uses a CTE. It gives me an error "Incorrent syntax near the Keyword 'WITH'. ......."if this is a common table expression......previous statement must be terminated...
Anonymous
8 years agoNot applicable
Did you use Import or Direct Query?
Thanks
B
roselilly23
7 years agoAdvocate V
I was getting the issue when using Direct Query with custom sql containing CTEs. I just re-wrote the query to have sub queries rather than the CTEs and it works fine now.