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
9 years agoNot applicable
anakoom You can't. If you watch what is actually sent to the SQL server you will see that an added syntax is added to the command which invalidates the statement. In Import, it just executes the SQL statement. In Direct Query it changes it to something like Select * from () - this is off the top of my head. In either case, that is why the openquery works, or the table valued function because both of those wouldn't create un-executable code.
I'm giving you an alternative to a SP because that method doesn't work, you can transform whatever you are doing in that SP to the TVP.
anakoom
9 years agoHelper I
Thanks ..let me convert to TVF..is there any way I can allow user to
Pass parameter value and data will fetch based on given parameter?
Pass parameter value and data will fetch based on given parameter?