Procedure with variable number of columns


Posted on 16th Feb 2014 07:03 pm by admin

Hi, I have a procedure that looks like this:

PROCEDURE PROC(p_cursor OUT sys_refcursor)

And in the procedure, I build up QUERY dynamically and the number of columns varies at runtime.

At the end I do

OPEN p_cursor for QUERY
Then to call this, I'm doing

call PROC(?)

My question is, how would I go about running the query from this procedure, then adding rows or modifying the existing results, then returning the modified data?

What I want to do is add a new row based on some condition, so I still need to return a variable number of columns, but I need to modify the results before I return them.

Is there any way of doing this? I need to do some calculations on the columns (the variable columns), create a new row, insert into result set, and return this new result set.

No comments posted yet

Your Answer:

Login to answer
221 Like 12 Dislike
Previous forums Next forums
Other forums

upload only text files
hi guys i want to upload only text like like (pdf,note pad and ofiice files) so can any one please t

How could I do this?
Ive got a simple lottery game, and am using an sql database to keep track of the numbers bought. But

PHP error. Need help urgently
Hi,

I am programming a php site and have a problem that i just cant find out how to fix. When

Looking for help reading a .txt or .ini file and outputting the info.
I have a file called Info.ini and It has the following info:
Code: [General]
Online=0
I wou

How do I use a global footer..?
If my index.php has a bole bunch of if functions and exit's in them

returning data from an ssh2_exec()
here's what i got.


$conn = ssh2_connect($this->_host);
ssh2_auth_password($c

Displaying different page content, depending on the logged in user.
Hi all, I am new to ASP.net (and web development in general), and have a question about how I can di

import table with dependency
Hi

What is the best way to import table back which has dependency?

SQL> cre

Ball movement
I want to move a ball from one point to another and it should hit a group of balls at the other end

Undefined index on my form
ok im getting Undefined index on this line.. print_r($_REQUEST['form']);

below is the full sc

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash