Re: SHow a cursor
Date: Tue, 07 Feb 2012 10:43:26 -0500
ddf <oratune_at_msn.com> wrote:
>You fetch from the refcursor:or select the function from dual:
>SQL> select get_tab_data('EMP') from dual;
And that's the magic word I had forgotten! Thank you.
I have a very simple function:
create or replace FUNCTION IHELP_GETSTATUS RETURN SYS_REFCURSOR AS
stmt := 'select * from ihelp.ihelp_survey_mapping'; open cv_1 for stmt;
END IHELP_GETSTATUS; The "select" statement works when I run it from the SQL developer console. But when I call the function I'm told "table or view does not exist". But it *does* exist.
For the record, I'm trying to be able to construct a SQL select statement dynamically. I figure if I can get this simple example to work, then I'm home free.
-- Tim Slattery Slattery_T_at_bls.govReceived on Tue Feb 07 2012 - 09:43:26 CST