Hi,
I'm used to MS T-SQL, and the concept of temporary tables and table variables.
I have an oracle database serving data for MS reporting services, and one procedure I am trying to run does the following:
[ul]
[li]Opens a cursor populated with a list of work requests, and associated data.[/li]
[li]Loops through the cursor passing some of the fields to a procedure on a linked server which returns 3 parameters.[/li]
[li]Currently uses dbms_output.put_line to display the results.[/li]
[/ul]
My procedure works perfectly, but what I want it to do is to populate a sys_refcursor so that the results can be picked up by Reporting Services.
If this was t-sql, I would create a temporary table or a table variable, and insert the results of each loop of the cursor into it. I would then select the results from the temporary table when the cursor is closed.
How can I do this in Oracle? I've looked at collections (1 dimensional) and temporary tables (not temporary) and don't know where to go. Help!
[tt]|_ |_ _ | _ _
|, | )(/, |(_)| )
'[/tt]
I'm used to MS T-SQL, and the concept of temporary tables and table variables.
I have an oracle database serving data for MS reporting services, and one procedure I am trying to run does the following:
[ul]
[li]Opens a cursor populated with a list of work requests, and associated data.[/li]
[li]Loops through the cursor passing some of the fields to a procedure on a linked server which returns 3 parameters.[/li]
[li]Currently uses dbms_output.put_line to display the results.[/li]
[/ul]
My procedure works perfectly, but what I want it to do is to populate a sys_refcursor so that the results can be picked up by Reporting Services.
If this was t-sql, I would create a temporary table or a table variable, and insert the results of each loop of the cursor into it. I would then select the results from the temporary table when the cursor is closed.
How can I do this in Oracle? I've looked at collections (1 dimensional) and temporary tables (not temporary) and don't know where to go. Help!
[tt]|_ |_ _ | _ _
|, | )(/, |(_)| )
'[/tt]