Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Eval or macro substitution
Message
 
To
All
General information
Forum:
Oracle
Category:
PL/SQL
Title:
Eval or macro substitution
Miscellaneous
Thread ID:
00883448
Message ID:
00883448
Views:
69
creating a ad-hoc report system where the number of columns is variable. We'll know the number of columns at runtime but would like to make this process as generic as possible. Instead of hard-coding the collection groups, We'd like to use something like the following code:

for i in 1..g_count -1 loop
l_field := l_field ||'l_value' || i || ', ';
end loop;
l_field := l_field || 'l_value'||g_count;
-- would like to use this
fetch l_ref_cur bulk collect into l_field;
-- instead of this
fetch l_ref_cur bulk collect into l_value, l_value1, l_value2, l_value3, l_value4, l_value5, l_value6;


This error is generated when compiling the code for the first fetch statement:

PLS-00497: cannot mix between single row and multi-row (BULK) in INTO list.

How can I tell the compiler to use the value of l_field instead of the variable name?
Next
Reply
Map
View

Click here to load this message in the networking platform