oracle - Quick-n-dirty results: View results of Procedure OUT cursor in SQL Worksheet? -


platform: oracle
language: pl/sql
issue: want output procedure out cursor sqldeveloper sqlwosksheet.

anyone know how use oracle "select * table( pipelinedfunction( param ) ) " check procedure code output cursors?

i using crsytal reports off of oracle stored procedure. crystal requires procedure return cursor, fetchs , reads.

the procedure code have working, want find easiest way view effects of changes procedure code. have sqldeveloper available, , i'm doing creation , sql testing in that. quick result visible in sql developer query result window ("sql worksheet").

is there (simple) way use function read cursor procedure? (and pipe out table function?)

convoluted, know, deal best when can see results of code changes. if can view record results directly, speed development of report.

i know of table function , little pipelining in oracle. know little cursors in general , sys_refcursor. know diddly types , why need them. (isn't sys_regcursor supposed away that?)

the current procedure adequate ungraceful series of queries, inserts global temp tables (gtt), joins gtt , original tables, more inserts, , more self-joins , selects results out cursor. might able better relying on cursors , such, current method enough results report.

i think can handle sql pretty (for our purposes), not oracle-specific developer... need help.

anybody run across this? whole idea speed development procedure code, i've spent couple of days looking way @ output... not had in mind.

update:
have tried hare-brained schemes based on slivers i've seen on web... such as

create or replace function get_backplane (    node varchar2 ) return sys_refcursor  results sys_refcursor;  begin     open results         select backplane(results, node) dual ;     ... etc. 

and

create or replace function get_backplane (      node varchar2 )  return  my_table_stru%rowtype  pipelined  begin ... 

i don't think oracle considering letting me re-reference output cursor procedure ("results" sys_refcursor holds results of last select in procedure). don't know how define it, open it, , reference procedure.

i never got place try

select * table(get_backplane( ... etc ) 

sorry typos , bad oracle grammar... it's been long several days.

sql developer allows use sql*plus commands in worksheet. need define variable hold output of ref cursor.

i may have misinterpreted actual code want run i'm assuming actual program procedure backplane(results, node) results out parameter of datatype sys_refcursor , node input parameter.

var rc refcursor  exec  backplane(results=>:rc, node=>42)   print rc 

the output of print statement written script output pane.

note use of sql*plus commands means have use run script option f5 rather execute statement.


Comments

Popular posts from this blog

ASP.NET/SQL find the element ID and update database -

jquery - appear modal windows bottom -

c++ - Compiling static TagLib 1.6.3 libraries for Windows -