Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!
Has anyone been able to get around this, yet.
I have tried:
let SQLStoredProc = () => SQL.database("Server","Database",[Query="EXEC dbo.RPT_Report"])
in SQLStoredProc
Result - Details: "Microsoft SQL: Incorrect syntax near '='."
Tried:
let SQLStoredProc = () => SQL.database("Server","Database",[Query="EXEC [dbo].[RPT_FlashReport]"])
in SQLStoredProc
Result - Details: "Microsoft SQL: Incorrect syntax near '='. Unclosed quotation mark after the character string '])
in SQLStoredProc'."
Tried:
DECLARE @sqlCommand varchar(1000)
SET @sqlCommand = 'dbo.Testproc'
EXEC (@sqlCommand)
This one gets past the initial load and will bring me into query editor, but when I try to apply and close the result below occurs.
Result - Microsoft SQL: Incorrect syntax near the keyword 'DECLARE'. Incorrect syntax near ')'.
Hi @derektd
Please check if the workarounds in below posts could help you.
https://community.powerbi.com/t5/Desktop/Why-is-DECLARE-not-supported-Error/td-p/40983/page/2
Regards,
@v-cherch-msft No Luck: I tried...
let
SQLSource = () =>
let
Source = Sql.Database("hrc-testssql", "test_ods", [Query="Exec dbo.RPT_Report"])
in
Source
in
SQLSource
And I keep getting the message "Incorrect syntax near "=".
Vote for your favorite vizzies from the Power BI World Championship submissions!
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 64 | |
| 50 | |
| 42 | |
| 23 | |
| 20 |
| User | Count |
|---|---|
| 139 | |
| 116 | |
| 54 | |
| 37 | |
| 31 |