Forum Discussion
eferreira
10 years agoNew Member
Use SQL Store Procedure in Power BI
I have created a basic stored procedure without parameters in SQL Server, when I use the store procedure in Power Bi Desktop the return is ok in design but when I click on Save and Close in datasourc...
Anonymous
10 years agoNot applicable
stangellapallyeferreiranirajdubeyasocorro As a follow up to my previous post, i was testing this further due to another thread, and have discovered that you don't need to change any database settings or use OpenQuery. If you wrap your stored procedure in a variable you can import the data using a sproc (Doesn't work in Direct Query, only import)
example:
DECLARE @sqlCommand varchar(1000)
SET @sqlCommand = 'dbo.Testproc'
EXEC (@sqlCommand)
stangellapally
10 years agoFrequent Visitor
This solution seems to be working and its lot easier too.
Thanks much Anonymous!