Forum Discussion
Why is DECLARE not supported (Error)?
- 10 years ago
Hi jsBrizius,
We reproduced same issue as yours. Power BI Desktop will always resolve the front end input SQL statement as a derived table. So when passing the SQL statement, the "Decalare"statement cause syntax error. See the fetched query in SQL profiler:
We have reported this issue internally.
Regards,
Is this a bug?
My query is much harder to read without the ability to declare a variable. Seems strange that it works fine in the Query Editor.
Hi jsBrizius,
We reproduced same issue as yours. Power BI Desktop will always resolve the front end input SQL statement as a derived table. So when passing the SQL statement, the "Decalare"statement cause syntax error. See the fetched query in SQL profiler:
We have reported this issue internally.
Regards,
- HarshVidap4 years agoFrequent Visitor
Was the issue resolved?
Update: The issue wasn't resolved and you still can't use temp tables or declare statements.- WTsrnl3 years agoAdvocate I
Maybe we can make this into a new Topic, since this is probably not at the top of their list, or even close to the first 5 pages of features.
That way, we can trigger a new response
- schuffa2 years agoAdvocate III
Any news on an ETA when this will work??