Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Reply
llarkin11
Frequent Visitor

Oracle Stored Proc using Power BI Parms

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?

1 ACCEPTED SOLUTION
llarkin11
Frequent Visitor

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"

 

 

View solution in original post

5 REPLIES 5
llarkin11
Frequent Visitor

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!

llarkin11
Frequent Visitor

I was able to resolve, no help needed.

llarkin11
Frequent Visitor

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!

 

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.