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)

Did you know?Explore Trending and Topic pages for more stories like this.
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

a very simple php header question (sorry!)
Firstly...I do apologise if this annoys anyone....a header error

I'm do not know php &

Grabbing Values From an Array for Posting
I have a grid array that I am using with a form that when it hits the currently named test.php it lo

Multi Level Array Problem
hi all,

For example I have array like below:

$temp = array(array('north america', 'us'

I need some help with the IF command...
I have a large number of images in one section of my website with the .jpg format. I'm adding a bun

Showing selected item at top of list
Hi,

I've got a list of names which i am fetching from database like this:
$qry = db_query

Socket Server Response Headers
Earlier I had a post about my Socket Server, I wasn't able to get it to connect, now I can

I

simple script won't work. Please help
I'm new to php, and I am having trouble displaying a simple script in my web browser. My php code ex

Table Control
Hi Guru's,

I've created a Module pool program, which contains the Table Control.

php mailer
How can i send a mail to large no, say 50,000 reciepients using [color=#0000FF]php mailer[/color]

$variable = $variable
Hello

Sorry if this is a really simple question but I have run out of ideas. Is there a reall

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