, Guest>> || || |
/ Oracle
 XML   [new]
cheacher
Member

:
: 62
<>
  < ="====================================================" /> 
  < ="1" ="18" ="18" ="" /> 
  < ="2" ="18" ="18" ="" /> 
  < ="3" ="18" ="17" ="" /> 
  < ="4" ="18" ="17" ="" /> 
  < ="5" ="18" ="15" ="1" ="" /> 
  < ="6" ="====================================================" /> 
  < ="7" ="====================================================" /> 
</>



:

  
  while data_xml.existsNode('//['||to_char(i+1)||']')>0 
  loop
    txml:=data_xml.extract('//['||to_char(i+1)||']');
    s:=txml.getStringVal();
    begin
      s := txml.extract('//@').getStringVal();
       execute immediate 'update WEEKS set W' || to_char(i*2-1) || '=' || S ||' where CONT=' || to_char(NCID);
    EXCEPTION
      when OTHERS then
        null;
    end;
    begin
      s := txml.extract('//@').getStringVal();
       execute immediate 'update WEEKS set W' || to_char(i*2) || '=' || S ||' where CONT=' || to_char(NCID);
    EXCEPTION
      when OTHERS then
        null;
    end;
    i:=i+1;
  end loop;
 


- , ?
PL/SQL...
2 11, 18:11[11698291]      |
 Re: XML   [new]

Member

: from dual
: 117
cheacher,

xmltransform + dbms_store
2 11, 18:16[11698337]      |
 Re: XML   [new]
cheacher
Member

:
: 62
,

1 Oracle Database 10g Express Edition Release 10.2.0.1.0 - Product
2 PL/SQL Release 10.2.0.1.0 - Production
3 CORE 10.2.0.1.0 Production
4 TNS for Linux: Version 10.2.0.1.0 - Production
5 NLSRTL Version 10.2.0.1.0 - Production

?
2 11, 18:18[11698357]      |
 Re: XML   [new]

Member

: from dual
: 117
cheacher,

C, ? XMLTable, .
2 11, 18:27[11698405]      |
 Re: XML   [new]

Member

: from dual
: 117
cheacher
,

1 Oracle Database 10g Express Edition Release 10.2.0.1.0 - Product
2 PL/SQL Release 10.2.0.1.0 - Production
3 CORE 10.2.0.1.0 Production
4 TNS for Linux: Version 10.2.0.1.0 - Production
5 NLSRTL Version 10.2.0.1.0 - Production

?


dbms_xmlstore xmltransform 10.2
2 11, 18:37[11698451]      |
 Re: XML   [new]
cheacher
Member

:
: 62
cheacher,

C, ? XMLTable, .


XMLTable XE
3 11, 16:41[11701031]      |
 Re: XML   [new]

Member

: from dual
: 117
?

BANNER
Oracle Database 11g Express Edition Release 11.2.0.2.0 - Production
PL/SQL Release 11.2.0.2.0 - Production
"CORE 11.2.0.2.0 Production"
TNS for 32-bit Windows: Version 11.2.0.2.0 - Production
NLSRTL Version 11.2.0.2.0 - Production

select crs.*
  from xmltable('//' PASSING 
       XMLType('<>
                  < ="====================================================" /> 
                  < ="1" ="18" ="18" ="" /> 
                  < ="2" ="18" ="18" ="" /> 
                  < ="3" ="18" ="17" ="" /> 
                  < ="4" ="18" ="17" ="" /> 
                  < ="5" ="18" ="15" ="1" ="" /> 
                  < ="6" ="====================================================" /> 
                  < ="7" ="====================================================" /> 
                </>')
                COLUMNS ""       CHAR(100) PATH '@',
                        ""  CHAR(100) PATH '@',
                        ""  CHAR(100) PATH '@',
                        ""    CHAR(100) PATH '@',
                        "" CHAR(100) PATH '@',
                        ""     CHAR(100) PATH '@') as crs;

10.2 .
3 11, 21:47[11701729]      |
 Re: XML   [new]
cheacher
Member

:
: 62
?

BANNER
Oracle Database 11g Express Edition Release 11.2.0.2.0 - Production
PL/SQL Release 11.2.0.2.0 - Production
"CORE 11.2.0.2.0 Production"
TNS for 32-bit Windows: Version 11.2.0.2.0 - Production
NLSRTL Version 11.2.0.2.0 - Production

select crs.*
  from xmltable('//' PASSING 
       XMLType('<>
                  < ="====================================================" /> 
                  < ="1" ="18" ="18" ="" /> 
                  < ="2" ="18" ="18" ="" /> 
                  < ="3" ="18" ="17" ="" /> 
                  < ="4" ="18" ="17" ="" /> 
                  < ="5" ="18" ="15" ="1" ="" /> 
                  < ="6" ="====================================================" /> 
                  < ="7" ="====================================================" /> 
                </>')
                COLUMNS ""       CHAR(100) PATH '@',
                        ""  CHAR(100) PATH '@',
                        ""  CHAR(100) PATH '@',
                        ""    CHAR(100) PATH '@',
                        "" CHAR(100) PATH '@',
                        ""     CHAR(100) PATH '@') as crs;

10.2 .



Express Edition...

ORA-19114: error during parsing the XQuery expression: ORA-06550: line 1, column 13: PLS-00201: identifier 'SYS.DBMS_XQUERYINT' must be declared ORA-06550: line 1, column 7: PL/SQL: Statement ignored
3 11, 23:41[11701994]      |
 Re: XML   [new]
AmKad
Member

:
: 5222
cheacher,

+ ?
with s as
(select        XMLType('<>
                  < ="====================================================" /> 
                  < ="1" ="18" ="18" ="" /> 
                  < ="2" ="18" ="18" ="" /> 
                  < ="3" ="18" ="17" ="" /> 
                  < ="4" ="18" ="17" ="" /> 
                  < ="5" ="18" ="15" ="1" ="" /> 
                  < ="6" ="====================================================" /> 
                  < ="7" ="====================================================" /> 
                </>')xml from dual)
select 
extract(column_value, '/@')       f1,
extract(column_value, '/@')  f2,
extract(column_value, '/@')  f3,
extract(column_value, '/@') f4,
extract(column_value, '/@')     f5,
extract(column_value, '/@')    f6
from s, 
table(xmlsequence(EXTRACT(xml, '//*')));

F1  F2  F3  F4  F5  F6
--- --- --- --- --- ------------------------------------------------------------
                    ====================================================
1   18  18          
2   18  18          
3   18  17          
4   18  17          
5   18      15  1   
6                   ====================================================
7                   ====================================================

8 rows selected.
4 11, 00:09[11702036]      |
 Re: XML   [new]

Member

: from dual
: 117
cheacher,

XE , 11.2
10.2 XE

mdrake, Posted: 16.08.2006
XQuery is not available in XE due to a dependancy on Java in the database. We use a Java based parser even they the XQuery engine is in 'C'. This limitation will be removed in a future release of the database... There is no date I am aware of for a refresh of XE
4 11, 00:24[11702077]      |
 Re: XML   [new]
cheacher
Member

:
: 62
,

SQL , .

PL/SQL.
XML CLOB .

<>
 < =" " ="." ="1" ="340" ="82" ="4" ="123" ="2" ="340" ="..1">
 <>
  < ="1" CrECTS="5,5" ="6" /> 
  < ="2" CrECTS="4,5" ="4,5" /> 
  </>
  < ="1" ="72" ="2" ="56" /> 
  < ="2" ="54" ="1" ="26" /> 
  < ="3" ="54" ="1" /> 
  < ="4" ="72" ="2" ="36" /> 
  </>
 < =" " ="." ="1" ="408" ="56" ="5" ="1234" ="2" ="1" ="408" ="..2">
 <>
  < ="1" CrECTS="5" ="5" /> 
  < ="2" CrECTS="4" ="4" /> 
  < ="3" CrECTS="2,5" ="3" /> 
  </>
  < ="1" ="72" ="45" /> 
  < ="2" ="68" /> 
  < ="3" ="72" ="11" /> 
  < ="4" ="68" /> 
  < ="5" ="72" ="36" /> 
  </>
 < ="    " ="." ="1" ="70" ="31" ="1" ="2" ="70" ="..3">
 <>
  < ="1" CrECTS="1,5" ="2" /> 
  </>
  < ="1" ="36" ="3" ="31" /> 
  </>
</>


, .. ...

create table EDUSTRINGS
(
  ID number, 
  SUBJECT varchar2, --@
  TEST varchar2, --@
  EXAM varchar2, --@
  L1 number, --//@ "where //@=1"
  L2 number, --//@ "where //@=2"
 ...
)
4 11, 01:19[11702177]      |
/ Oracle