Get certified for free when you join Fabric Data Days 2026 and dive into Fabric, Power BI, SQL, AI, and other essential data skills.
Join nowJuly 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more
Hi,
I am trying to load from SQL server to power bi model data successfully loaded but when I click on Apply Query changes and close than I am getting below error refer below screenshot
Microsoft SQL: Incorrect syntax near the keyword 'DECLARE'. Incorrect syntax
If there is syntax in SQL Query. Why data loaded in the power query data model ??
Please helps
Hi @Anonymous ,
HYG -
https://community.powerbi.com/t5/Desktop/Why-is-DECLARE-not-supported-Error/td-p/40983
If any additional clarification required, please let me know.
Best Regards,
Mail2inba4
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.
Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.
| User | Count |
|---|---|
| 63 | |
| 41 | |
| 39 | |
| 39 | |
| 38 |