|
create table test_t (document xmltype);
insert into test_t values('<control>
<content d="2017-05-02" o="10.100" h="10.200" c="10.180" l="10.060" v="16115" bl=""/>
<content d="2017-05-03" o="10.180" h="10.270" c="10.180" l="10.160" v="22716" bl=""/>
<content d="2017-05-04" o="10.210" h="10.370" c="10.310" l="10.140" v="17380" bl=""/>
<content d="2017-05-05" o="10.310" h="10.370" c="10.050" l="10.000" v="20413" bl=""/>
</control>');
select x.d,x.o,x.h,x.c,x.l,x.v
from test_t t,
XMLTABLE ('/control/content'
PASSING t.document
COLUMNS d VARCHAR2(30) PATH '@d',
o VARCHAR2(30) PATH '@o',
h VARCHAR2(30) PATH '@h',
c VARCHAR2(30) PATH '@c',
l VARCHAR2(30) PATH '@l',
v VARCHAR2(30) PATH '@v') x; |
|