Hi, I've got a very specific question/issue, here are the bare details.
I'm using PBI in the cloud, where I have to call a stored procedure using DirectQuery. So we had to turn on Distributed AD Hoc in SQL Server to get it to work. Here was the syntax in Power Query for the DirectQuery dataset: this was based on a single Parameter value. This part works fine:
= Sql.Database("SERVERNAME", "DATABASE" ,
[Query="SELECT * FROM OPENROWSET #(lf)('SQLNCLI','server=SERVER ;uid=ID;pwd=PW',
'EXEC DATABASE.DBO.RunMyProc """ & @KeyValue & """')"]
However, I had to turn the proc into a multi-select. So inside the proc, I used the STRING_SPLIT function in SQL Server, to convert a CSV list into a table variable. That part works and when I test the proc inside of SQL SSMS, that works fine.
However, in PBI when I make the dynamic parameter a multi-select (and I've written code to check if the @Keyvalue is a list, I get all sorts of errors, regardless of what I try.
So - given what I have above....if the @KeyValue parameter is now a CSV list, and I know the proc can take that CSV parameter and turn it into a table variable - how would I change the Power Query code above? I have to believe it's something simple. I've looked at different Web examples, but they are all slightly different in some way.
If anyone has any thoughts.....really in a bind here. Thanks!
Kevin S. Goff