Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Eval or macro substitution
Message
Information générale
Forum:
Oracle
Catégorie:
PL/SQL
Divers
Thread ID:
00883448
Message ID:
00886638
Vues:
23
That's what I suspected. Makes me miss my VFP days. Thanks for confirming this.


>Hi Dave.
>
>I have not seen a situation in Oracle where you can assign a value to a variable by assigning the value to the name of the variable.
>
>Even with EXECUTE IMMEDIATE, you create the entire SQL as a variable but you must explicitly list any INTO variables.
>
>-- George
>
>>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?
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform