plsql - How to return table and additional local variable from oracle stored procedure? -


in stored procedure, need generate report workbench. need take record database tables(by using select query) directly, plus need add manipulated variables. have return resulted collection procedure sys_refcursor.

for example: have table emp(id, name). have variable job want return (emp.id, emp.name, job) procedure.

if can great. in advance.

it's easy enough combine pl/sql variable data table....

create or replace function get_some    return sys_refcursor     return_value sys_refcursor;     l_whatever varchar2(10) := 'job'; begin     open return_value         select emp_id, emp_name, l_whatever         your_table;     return return_value; end; / 

i suspect isn't mean. if teh case youi need edit question explain more you're doing. mean "some manipulated vriables (sic)". providing sample input , output helpful.


Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -