glennm0270
New member
- Joined
- Nov 8, 2017
- Messages
- 4
- Reaction score
- 0
- Points
- 0
- Location
- Charlotte, NC
- Website
- www.glennmillerconsulting.com
- Excel Version(s)
- Win: 1803, Mac: 16.17 (180909)
Is there a way for me to fetch a specific result set into Power Query from a SQL stored procedure that returns multiple result sets?
To be more specific, there is a SQL stored procedure I must use that returns 2 result sets. The first set is rows that each have 1 text column with month names. For example:
The second set contains a few numbers for each month, same order as the first set. For example:
I can invoke the stored procedure from Power Query using a SQL database as the source and putting the appropriate EXEC statement in as the query, but Power Query always loads just the first result set.
I'd like to fetch just the second result set into my query. Is there a way to do that? And, before anyone asks...I don't have access to modify the stored procedure, add new stored procedures or views to the DB, etc.
Appreciate any guidance.
To be more specific, there is a SQL stored procedure I must use that returns 2 result sets. The first set is rows that each have 1 text column with month names. For example:
MonthName |
Jan |
Feb |
Mar |
The second set contains a few numbers for each month, same order as the first set. For example:
FirstNum | SecondNum | ThirdNum |
500 | 200 | .4 |
600 | 300 | .5 |
700 | 1000 | -.43 |
I can invoke the stored procedure from Power Query using a SQL database as the source and putting the appropriate EXEC statement in as the query, but Power Query always loads just the first result set.
I'd like to fetch just the second result set into my query. Is there a way to do that? And, before anyone asks...I don't have access to modify the stored procedure, add new stored procedures or views to the DB, etc.
Appreciate any guidance.