Wednesday, October 10, 2007

ORA-19025: EXTRACTVALUE returns value of only one node

This error occurs when you try to extract scalar values from an XML fragment containing multiple nodes.
In order to simulate error, try executing the following query in a schema where you have at least two tables:
SELECT extractvalue(
xmltype.createXML(
dbms_xmlgen.getxml('select * from user_tables'))
,'/ROWSET/ROW/TABLE_NAME')
FROM dual;

ORA-19025: EXTRACTVALUE returns value of only one node
Indeed if you add a small XPath condition to the query above, you can get a valid result:
SELECT extractvalue(
xmltype.createXML(
dbms_xmlgen.getxml('select * from user_tables'))
,'/ROWSET/ROW[1]/TABLE_NAME')
FROM dual;
This query will extract the table name of the first TABLE_NAME node.

If you are trying to extract all table names from this XML file, then you must rewrite the query as i showed in a previous topic.

See message translations for ORA-19025 and search additional resources.



ORA-19025: EXTRACTVALUE restituisce il valore di un solo nodo
ORA-19025: EXTRACTVALUE devuelve un valor de un solo nodo
ORA-19025: EXTRACTVALUE retorna el valor de només un node
ORA-19025: EXTRACTVALUE renvoie la valeur d'un seul noeud
ORA-19025: EXTRACTVALUE gibt Wert von nur einem Knoten zurück
ORA-19025: Η τιμή EXTRACTVALUE επιστρέφει τιμή με μόνο ένα κόμβο
ORA-19025: EXTRACTVALUE returnerer kun værdi for én node
ORA-19025: EXTRACTVALUE returnerar värdet för bara en nod
ORA-19025: EXTRACTVALUE returnerer en verdi for bare én node
ORA-19025: EXTRACTVALUE palauttaa vain yhden solmun arvon
ORA-19025: Az EXTRACTVALUE csak egy csomópont értékét adja vissza.
ORA-19025: EXTRACTVALUE returnează valoarea pentru un singur nod
ORA-19025: EXTRACTVALUE retourneert waarde van slechts één node.
ORA-19025: EXTRACTVALUE retorna valor de apenas um nó
ORA-19025: EXTRACTVALUE devolve o valor de um único nó
ORA-19025: EXTRACTVALUE возвращает значение только одного узла
ORA-19025: EXTRACTVALUE vrací pouze hodnotu jednoho uzlu
ORA-19025: EXTRACTVALUE vracia hodnotu len jedného uzla
ORA-19025: EXTRACTVALUE zwraca wartość tylko jednego węzła
ORA-19025: EXTRACTVALUE sadece tek bir düğümün değerini döndürür
ORA-19025: EXTRACTVALUE returns value of only one node

No comments:

yes you can!

Two great ways to help us out with a minimal effort. Click on the Google Plus +1 button above or...
We appreciate your support!

latest articles