This content has been marked as final. Show 20 replies
971168 wrote:So, based on your original question on the other thread it would be...
RPT_HEADER VARCHAR2(512 Byte)
QRY_TITLE VARCHAR2(256 Byte)
AUTHOR VARCHAR2(256 Byte)
Above is the table format
replace "yourtablename" with whatever your table name is, as you couldn't even be bothered to post that for us or format your code as per the FAQ.
select x.* from yourtablename ,xmltable('/DETAILS/FIELDS_VALUES/FIELD' passing param_values columns name varchar2(30) path './NAME' ,val varchar2(10) path './VALUE' ) x
971168 wrote:Why do you say the data is 4e1a77? How do you get that value? That is not XML.
This is the data encapsulated in the XML datatype like following example.
Ex: Column Name : ParamValues
Data is: 4e1a77
Please help me to retrieve that using SQL script.
So you have a table with parameter values - something like this:
And you have some values in that table - something like this:
SQL> create table param_table ( 2 param_name varchar2(20) 3 , param_values xmltype 4 ) 5 / Table created.
If I select that data in a SQL*PLUS session I see this:
SQL> insert into param_table values ( 2 'MYPARAM' 3 , XMLTYPE('<params><theanswer>42</theanswer><question>Whodunnit</question></params>') 4 ) 5 / 1 row created.
It is not encrypted nor encapsulated.
SQL> select param_values 2 from param_table 3 where param_name = 'MYPARAM' 4 / PARAM_VALUES -------------------------------------------------------------------------------- <params><theanswer>42</theanswer><question>Whodunnit</question></params>
Would you please in a SQL*PLUS session do a similar select like the one above and cut-and-paste the SQL statement and the output?
That way we can see the XML data you have in your param_value field and then we can advise how to retrieve individual bits of data from that XML.
Kim Berg Hansen wrote:That's the instance name of the object returned by the toString() method.
Why do you say the data is 4e1a77? How do you get that value? That is not XML.
Most likely, yet to be confirmed, OP is doing something like this :
Now what's the requirement?
xml = rs.getOpaque(1); System.io.println(xml.toString());
- getting the document as a whole to process it client-side ?
- shredding the document into relational rows and columns ? (we already showed that multiple times)
Kim Berg Hansen wrote:Yeah, marked it as correct, then went on to post more rubbish (and duplicating it) without sufficient details.
BluShadow wrote:Ah, sorry. Then he already has his answer and he marked it as correct. So it is solved and everybody is happy :D
The data is already on his original question...