Oracle 10g: Extract data (select) from XML (CLOB Type)

前端 未结 7 1325
[愿得一人]
[愿得一人] 2021-02-07 20:03

I\'m new in Oracle and I\'ve - maybe trivial - a problem in a select. (I\'m using Oracle 10g Express Edition).

I\'ve a DB with a field CLOB: mytab.xml This column have a

7条回答
  •  感情败类
    2021-02-07 20:22

    In case the XML store in the CLOB field in the database table. E.g for this XML:

    
    
        
            
            000
        
    
    
    

    This is the Extract Query:

    SELECT EXTRACTVALUE (
        xmltype (T.CLOB_COLUMN_NAME),
        '/Awmds/General_segment/General_segment_id/Customs_office_code')
        AS Customs_office_code
    FROM TABLE_NAME t;
    

提交回复
热议问题