Salve,
ho il seguente blocco PL/SQL, che ho modificato giusto per far capire quale è la struttura. Più che altro mi interessa la select dentro il LOOP perché mi da l'errore:
PL/SQL: ORA-00932: tipi di dati incoerenti: previsto CHAR, ottenuto -
ma non capisco perché.
Se faccio: Select XMLElement("insert") into SelectOutput from dual ottengo giustamente
<insert></insert>
Ma innestata in un blocco PL/SQL mi da problemi.
Avete qualche suggerimento ?
codice:
DECLARE
CURSOR curs
IS
SELECT qualcosa
FROM tabella;
record curs%ROWTYPE;
SelectOutput VARCHAR2(32767);
BEGIN
OPEN curs;
LOOP
FETCH curs INTO record;
EXIT WHEN curs%NOTFOUND;
dbms_output.put_line(record.qualcosa);
SelectXMLElement("insert")intoSelectOutputfrom tabella2 where chiave=record.qualcosa;
--SelectXMLElement("insert")intoSelectOutputfrom dual;
END LOOP;
CLOSE curs;
END;
/