Skip to Content
0
Former Member
Feb 14, 2014 at 03:02 PM

table variables as inner call parameters for cursors

404 Views

Hey everyone.

i have problem that lead to another problem. If there is an easy way to solve the first, then the second is basically mood 😀

Problem 1: I have a cursor with a long Select statement. I want to see, if i can generate the result set of that statement with the use of CE Functions in a parent procedure and give a table variable as a parameter in an inner call for a child procedure with the cursor. Is that possible ?

create parent ()

...

BEGIN

temp = CE_COLUMN_TABLE(...)

call child(temp)

END

_____

create child( in variable tabletype)

cursor foo for select * from variable;

BEGIN

for row as foo do

...

end for

end

Problem 2: How do i pass a table variable as a parameter into a procedure during call, when i have to define the IN parameter type somehow beforehand during that procedures creation?

i.e. in the example above, what would "tabletype" in the create child statement really be?

Thanks for any help!

Christian