Answer the question
In order to leave comments, you need to log in
How to return a table from a function in python cx_oracle?
Hello, I've been scouring the internet for two days now and can't find anything.
Have a function
create or replace PROCEDURE GET_GROUPS;
RESULT (
PARENT IN NUMBER,
NAME OUT VARCHAR2,
FULLNAME OUT VARCHAR2,
ID OUT NUMBER)
AS
BEGIN
SELECT
GA.ID, GA.NAME, GA.FULLNAME
INTO ID, NAME, FULLNAME
FROM
GROUPT GA
WHERE
GA.PARENT == PARENT
END;
con = system.db.connect()
cur = con.cursor()
raw_cur = cur.get_object()
res = [id_parent,raw_cur.var(str),raw_cur.var(str),raw_cur.var(int)]
res = cur.callproc('WHS.GET_GROUPS', res)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question