CTE Syntax Error #320
-
I'm receiving the following error when using the "Execute dbt SQL" button while using CTEs. [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Parse error at line: 1, column: 24: Incorrect syntax near 'with'. (103010) I've also attached a screenshot of my .sql file -- everything here seems normal to me. I have even run the same code, while excluding macros, directly on my database and did not receive any error. Does the dbt-power-user extension add any text to the beginning of SQL? I have succesfully been able to update my query template to accommodate T-SQL. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
dbt power user just uses what you put in the query template to construct the query that is used to execute previews. No other magic involved. By default it will use WITH queries but that's not compatible with SQL server, but as you already know you can override this behavior by setting a custom query template. |
Beta Was this translation helpful? Give feedback.
dbt power user just uses what you put in the query template to construct the query that is used to execute previews. No other magic involved. By default it will use WITH queries but that's not compatible with SQL server, but as you already know you can override this behavior by setting a custom query template.