Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Eval or macro substitution
Message
 
À
Tous
Information générale
Forum:
Oracle
Catégorie:
PL/SQL
Titre:
Eval or macro substitution
Divers
Thread ID:
00883448
Message ID:
00883448
Vues:
70
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?
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform