Forum Discussion
cl27274
Feb 03, 2021Copper Contributor
Parameterized Sql Statement: Expression.Error: This native database query isn't currently supported
Hello, I have a query in excel that loads without any issues. I have tried adding parameters to the query(SQL - statement), but this leads to this error: Expression.Error: This native database qu...
- Feb 04, 2021
That could be
... pParText = fParameter(ParameterTable,From), Source = Sql.Database(Server, Database, [Query = "CALL SALES_BY_CATEGORY_1234 ( '51', " & pParText & " '2020-12-31','',......)"]), nextStep, ...
Another way is as here Chris Webb's BI Blog: Passing Parameters To SQL Queries With Value.NativeQuery() In Power Query And Power BI Chris Webb's BI Blog (crossjoin.co.uk) but in general they are not too far from each other.
DadaDude
Sep 14, 2021Copper Contributor
I experienced the same error with a similar setup (Excel value.NativeQuery call to a parameterized SQL Server Stored Procedure). Note the execution of the NativeQuery call to SQL (to insert records into a table) was successful, but Excel reported an "Expression.Error: This native database query isn't currently supported." error. In my case, this was caused when SET NOCOUNT ON is present in the stored procedure. I cannot find any NativeQuery documentation to determine if this is expected behaviour.