Forum Discussion
anudeep3721
8 years agoNew Member
calling stored procedure using parameter error
Hi.. i'm calling a stored procedure(SQL) in powerbi using direct query it is executed successfully by passing value manually. Now i'm trying to execute the value using parameter option in powerbi , s...
- 8 years ago
We can use parameter when call store procedure. Smaple query for you reference.
let SQLSource = (param1 as date, param2 as date) => let Source = Sql.Database("servername", "databasename", [Query="exec p4test '"& Date.ToText(param1) & "','" & Date.ToText(param2)&"' #(lf)#(lf)#(lf) #(lf)"]) in Source in SQLSourceRegards,
Charlie Liao
Anonymous
8 years agoNot applicable
anudeep3721 Pass the text and do the conversion of the value in the stored procedure. That would probably be the most straight forward.