Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
I would like to use Power BI Parm with an Oracle Stored Procedure, but I am not sure how to define the Parm.
what is the code to declare the parm?
Solved! Go to Solution.
Code and Solution
Initial edit for Oracle call to stored procedure
DECLARE P_RC SYS_REFCURSOR;
P_YEARS NUMBER :=1;
BEGIN
ZSEL_DIM_FMS_FISCALYEAR (P_YEARS,P_RC);
DBMS_SQL.RETURN_RESULT(P_RC);
END;
Advanced Editor Prior to edit for YearsParm
let
#"Fiscal Year" = Oracle.Database("bgdwdev", [HierarchicalNavigation=true,
Query="DECLARE P_RC SYS_REFCURSOR;
#(lf)P_YEARS NUMBER :=1;#(lf)
#(lf)BEGIN#(lf)ZSEL_DIM_FMS_FISCALYEAR (P_YEARS,P_RC);
#(lf)DBMS_SQL.RETURN_RESULT(P_RC);#(lf)END;", CreateNavigationProperties=false])
in
#"Fiscal Year"
Advanced Editor After edit for YearsParm
let
#"Fiscal Year" = Oracle.Database("bgdwdev", [HierarchicalNavigation=true,
Query="DECLARE #(lf)P_RC SYS_REFCURSOR;
#(lf)P_YEARS NUMBER := "& Text.From(YearsParm) &";#(lf)
#(lf)BEGIN#(lf)ZSEL_DIM_FMS_FISCALYEAR (P_YEARS,P_RC);
#(lf)DBMS_SQL.RETURN_RESULT(P_RC);#(lf)END;", CreateNavigationProperties=false])
in
#"Fiscal Year"
Code and Solution
Initial edit for Oracle call to stored procedure
DECLARE P_RC SYS_REFCURSOR;
P_YEARS NUMBER :=1;
BEGIN
ZSEL_DIM_FMS_FISCALYEAR (P_YEARS,P_RC);
DBMS_SQL.RETURN_RESULT(P_RC);
END;
Advanced Editor Prior to edit for YearsParm
let
#"Fiscal Year" = Oracle.Database("bgdwdev", [HierarchicalNavigation=true,
Query="DECLARE P_RC SYS_REFCURSOR;
#(lf)P_YEARS NUMBER :=1;#(lf)
#(lf)BEGIN#(lf)ZSEL_DIM_FMS_FISCALYEAR (P_YEARS,P_RC);
#(lf)DBMS_SQL.RETURN_RESULT(P_RC);#(lf)END;", CreateNavigationProperties=false])
in
#"Fiscal Year"
Advanced Editor After edit for YearsParm
let
#"Fiscal Year" = Oracle.Database("bgdwdev", [HierarchicalNavigation=true,
Query="DECLARE #(lf)P_RC SYS_REFCURSOR;
#(lf)P_YEARS NUMBER := "& Text.From(YearsParm) &";#(lf)
#(lf)BEGIN#(lf)ZSEL_DIM_FMS_FISCALYEAR (P_YEARS,P_RC);
#(lf)DBMS_SQL.RETURN_RESULT(P_RC);#(lf)END;", CreateNavigationProperties=false])
in
#"Fiscal Year"
Hi @llarkin11 ,
Thanks for sharing.
Best Regards,
Kelly
Did I answer your question? Mark my reply as a solution!
I was able to resolve, no help needed.
All sorts of examples for Microsoft platforms!
Hi @llarkin11 ,
Could you pls click "accept as Solution" to close it?
Best Regards,
Kelly
Did I answer your question? Mark my reply as a solution!
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
104 | |
95 | |
80 | |
67 | |
62 |
User | Count |
---|---|
146 | |
110 | |
107 | |
86 | |
63 |