Forum Discussion
Anonymous
6 years agoNot applicable
How to use a SQL Server Stored Proc (with no parameters) as a datasource ?
Ran into an issue while trying to use a SQL Server Stored Procedure as a data-source in Power BI desktop. I get the error "Microsoft SQL: Incorrect syntax near the keyword 'EXEC'.". Kind of ironic th...
- 6 years ago
In SQL can you create a view that calls the stored proc then hit the view from Power BI?
Anonymous
6 years agoNot applicable
I don't think a VIEW can execute a stored procedure within itself. I have tried several types of commands and encountered compilation errors. BTW, my original post seems like an area of improvement for Power BI development team
EZ-WG
2 years agoNew Member
Correct, you cannot call a sotred procedure from a view. What you can do is have the stored procedure write to a table and then schedule a SQL Agent job to run the stored procedure at your desired interval and then just use that table as your PBI data source.