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
RakeshSinghr
Resolver I
Resolver I

Oracle Stored Proc en PBI Desktop

Hello

I need help executing an oracle stored procedure that simply returns few columns.

I am receiving the error "Oracle:ORA00900: Invalid SQL Statement".

I'm using the ref cursor - see below the code - it produces an error. It works well in the sql developer.

CREATE OR REPLACE PROCEDURE Schema. TestSP
As
c1 SYS_REFCURSOR;
Start

open c1 for
SELECT Col1,Col2
FROM LinkDBServer;
DBMS_SQL. RETURN_RESULT c1);

END;

run schemax. TestSP

Using Pipened features - no error on the Powerbi desktop

CREATE OR REPLACE TYPE t_type
AS AN OBJECT
(
col1 NUMBER(22,14) NULL,
col2 VARCHAR2(120)
);


CREATE OR REPLACE TYPE t_table_type
AS T_TYPE TABLE;

CREATE OR REPLACE FNC_GET_T_PIPELINED FUNCTIONS
RETURN t_table_type
PIPELINED
As
Start

PARA v_Rec IN (SELECT Col1, Col2 FROM LinkDBServer where rownum<-10) LOOP

PIPE ROW (t_type(v_Rec.Col1, v_Rec.Col2));

END LOOP;

RETURN;
END;

SELECT Col1,Col2 FROM TABLE(fnc_Get_t_Pipelined());

Any suggestions on how to run an oracle process in Power BI desktop files?

1 REPLY 1
v-lili6-msft
Community Support
Community Support

hi  @RakeshSinghr 

You could use Oracle Stored procedure in power bi, but it seems that Ref_Cusors is not available for now.

 

Regards,

Lin

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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.