Forum Discussion

SJi's avatar
SJi
Frequent Visitor
8 years ago

How to load data from stored procedure?

Hello,

 

we have stored procedures created for our mobile and paginated report and we would like to use them with PowerBI. The procedures often have temp tables and parameters. I've enabled opequery on our database, however I'm getting an error as show below. How can be stored procedure used to get data in PowerBI? Any help would be appreciated.

 

Details: "Microsoft SQL: The metadata could not be determined because statement 'SELECT 
		ROW_NUMBER () OVER (PARTITION BY a.MonthBack ORDER BY sum(a.ApprovedLoanAmount) DESC)	
AS' in procedure 'MR0001_MosRanking' uses a temp table."

1 Reply

  • Greg_Deckler's avatar
    Greg_Deckler
    Community Champion

    I believe typically you use the EXEC SQL statement in the Advanced portion of the connection to SQL Server.