Forum Discussion
Oracle Stored Proc in PBI Desktop
- 6 years ago
For anyone in the same boat as me - Oracle stored proc with ref cursors can be executed within power bi desktop. It just need to be run with cursor variable declaration.
Within Oracle:
CREATE OR REPLACE PROCEDURE [SCHEMA].[STOREDPROCNAME]
( P_RC OUT SYS_REFCURSOR )
AS
BEGIN
OPEN P_RC FOR SELECT COL1,COL2,COL3 BLAH BLAH BLAH
END;
Within Power BI Desktop:
DECLARE P_RC SYS_REFCURSOR;
BEGIN
[SCHEMA].[STOREDPROCNAME](P_RC);
DBMS_SQL.RETURN_RESULT(P_RC);
END;
Hope this helps.
Regards
Rakesh Singh
Hi Rakesh
Thanks for the Code.
I am not getting any error during connection but when tried to save changes, getting error missing right paranthasis. Checked the syntax in advanced editor and everything looks correct but still I can see error.
Any ideas.
Thanks
siva
- siva_powerbi6 years ago
Helper IV
Thanks Rakesh,
Code is working, didn't do anything special just restarted the Power BI.
Thanks
Siva