1
SQL文を使用してXMLドキュメントから特定のデータをフェッチしようとしています。このドキュメントは、次のとおりです。XMLからのクエリデータ
SELECT RSphere
FROM XMLTABLE (
'/nsREF:Measure/nsREF:REF/nsREF:R/nsREF:Median/nsREF:Sphere'
PASSING XMLTYPE (BFILENAME ('MY_DIR', 'aaa.xml'),
NLS_CHARSET_ID ('Shift-JIS'))
COLUMNS RSphere VARCHAR2 (255) PATH 'text()')
しかし、私は取得しています:
<?xml version="1.0" encoding="Shift-JIS" ?>
<Ophthalmology xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:nsCommon="http://www.joia.or.jp/standardized/namespaces/Common" xmlns:nsREF="http://www.joia.or.jp/standardized/namespaces/REF" xsi:schemaLocation="http://www.joia.or.jp/standardized/namespaces/Common Common_schema.xsd http://www.joia.or.jp/standardized/namespaces/REF REF_schema.xsd">
\t <nsCommon:Common>
\t \t <nsCommon:Company>TOPCON</nsCommon:Company>
\t \t <nsCommon:ModelName>KR-800</nsCommon:ModelName>
\t \t <nsCommon:MachineNo>01</nsCommon:MachineNo>
\t \t <nsCommon:ROMVersion>1.05.08</nsCommon:ROMVersion>
\t \t <nsCommon:Version>1.2</nsCommon:Version>
\t \t <nsCommon:Date>2016-09-17</nsCommon:Date>
\t \t <nsCommon:Time>01:17:35</nsCommon:Time>
\t \t <nsCommon:Patient>
\t \t \t <nsCommon:No.>0006</nsCommon:No.>
\t \t \t <nsCommon:ID>0006</nsCommon:ID>
\t \t \t <nsCommon:FirstName></nsCommon:FirstName>
\t \t \t <nsCommon:MiddleName></nsCommon:MiddleName>
\t \t \t <nsCommon:LastName></nsCommon:LastName>
\t \t \t <nsCommon:Sex></nsCommon:Sex>
\t \t \t <nsCommon:Age></nsCommon:Age>
\t \t \t <nsCommon:DOB></nsCommon:DOB>
\t \t \t <nsCommon:NameJ1></nsCommon:NameJ1>
\t \t \t <nsCommon:NameJ2></nsCommon:NameJ2>
\t \t </nsCommon:Patient>
\t \t <nsCommon:Operator>
\t \t \t <nsCommon:No.></nsCommon:No.>
\t \t \t <nsCommon:ID></nsCommon:ID>
\t \t </nsCommon:Operator>
\t </nsCommon:Common>
\t <nsREF:Measure type="REF">
\t \t <nsREF:VD unit="mm">13.75</nsREF:VD>
\t \t <nsREF:DiopterStep unit="D">0.25</nsREF:DiopterStep>
\t \t <nsREF:AxisStep unit="deg">1</nsREF:AxisStep>
\t \t <nsREF:CylinderMode>-</nsREF:CylinderMode>
\t \t <nsREF:REF>
\t \t \t <nsREF:R>
\t \t \t \t <nsREF:List No="1">
\t \t \t \t \t <nsREF:Sphere unit="D">0.50</nsREF:Sphere>
\t \t \t \t \t <nsREF:Cylinder unit="D">-1.25</nsREF:Cylinder>
\t \t \t \t \t <nsREF:Axis unit="deg">178</nsREF:Axis>
\t \t \t \t \t <nsREF:SE unit="D">-0.25</nsREF:SE>
\t \t \t \t \t <nsREF:CataractMode></nsREF:CataractMode>
\t \t \t \t \t <nsREF:IOLMode></nsREF:IOLMode>
\t \t \t \t \t <nsREF:ConfidenceIndex></nsREF:ConfidenceIndex>
\t \t \t \t </nsREF:List>
\t \t \t \t <nsREF:List No="2">
\t \t \t \t \t <nsREF:Sphere unit="D">0.50</nsREF:Sphere>
\t \t \t \t \t <nsREF:Cylinder unit="D">-1.00</nsREF:Cylinder>
\t \t \t \t \t <nsREF:Axis unit="deg">177</nsREF:Axis>
\t \t \t \t \t <nsREF:SE unit="D">0.00</nsREF:SE>
\t \t \t \t \t <nsREF:CataractMode></nsREF:CataractMode>
\t \t \t \t \t <nsREF:IOLMode></nsREF:IOLMode>
\t \t \t \t \t <nsREF:ConfidenceIndex></nsREF:ConfidenceIndex>
\t \t \t \t </nsREF:List>
\t \t \t \t <nsREF:Median>
\t \t \t \t \t <nsREF:Sphere unit="D">0.50</nsREF:Sphere>
\t \t \t \t \t <nsREF:Cylinder unit="D">-1.00</nsREF:Cylinder>
\t \t \t \t \t <nsREF:Axis unit="deg">177</nsREF:Axis>
\t \t \t \t \t <nsREF:SE unit="D">0.00</nsREF:SE>
\t \t \t \t </nsREF:Median>
\t \t \t </nsREF:R>
\t \t \t <nsREF:L>
\t \t \t \t <nsREF:List No="1">
\t \t \t \t \t <nsREF:Sphere unit="D">0.50</nsREF:Sphere>
\t \t \t \t \t <nsREF:Cylinder unit="D">-0.50</nsREF:Cylinder>
\t \t \t \t \t <nsREF:Axis unit="deg">179</nsREF:Axis>
\t \t \t \t \t <nsREF:SE unit="D">0.25</nsREF:SE>
\t \t \t \t \t <nsREF:CataractMode></nsREF:CataractMode>
\t \t \t \t \t <nsREF:IOLMode></nsREF:IOLMode>
\t \t \t \t \t <nsREF:ConfidenceIndex></nsREF:ConfidenceIndex>
\t \t \t \t </nsREF:List>
\t \t \t \t <nsREF:List No="2">
\t \t \t \t \t <nsREF:Sphere unit="D">0.50</nsREF:Sphere>
\t \t \t \t \t <nsREF:Cylinder unit="D">-0.50</nsREF:Cylinder>
\t \t \t \t \t <nsREF:Axis unit="deg">179</nsREF:Axis>
\t \t \t \t \t <nsREF:SE unit="D">0.25</nsREF:SE>
\t \t \t \t \t <nsREF:CataractMode></nsREF:CataractMode>
\t \t \t \t \t <nsREF:IOLMode></nsREF:IOLMode>
\t \t \t \t \t <nsREF:ConfidenceIndex></nsREF:ConfidenceIndex>
\t \t \t \t </nsREF:List>
\t \t \t \t <nsREF:List No="3">
\t \t \t \t \t <nsREF:Sphere unit="D">0.50</nsREF:Sphere>
\t \t \t \t \t <nsREF:Cylinder unit="D">-0.50</nsREF:Cylinder>
\t \t \t \t \t <nsREF:Axis unit="deg">179</nsREF:Axis>
\t \t \t \t \t <nsREF:SE unit="D">0.25</nsREF:SE>
\t \t \t \t \t <nsREF:CataractMode></nsREF:CataractMode>
\t \t \t \t \t <nsREF:IOLMode></nsREF:IOLMode>
\t \t \t \t \t <nsREF:ConfidenceIndex></nsREF:ConfidenceIndex>
\t \t \t \t </nsREF:List>
\t \t \t \t <nsREF:Median>
\t \t \t \t \t <nsREF:Sphere unit="D">0.50</nsREF:Sphere>
\t \t \t \t \t <nsREF:Cylinder unit="D">-0.50</nsREF:Cylinder>
\t \t \t \t \t <nsREF:Axis unit="deg">179</nsREF:Axis>
\t \t \t \t \t <nsREF:SE unit="D">0.25</nsREF:SE>
\t \t \t \t </nsREF:Median>
\t \t \t </nsREF:L>
\t \t </nsREF:REF>
\t \t <nsREF:PD>
\t \t \t <nsREF:WorkingDistance unit="cm"></nsREF:WorkingDistance>
\t \t \t <nsREF:Distance unit="mm">68.50</nsREF:Distance>
\t \t \t <nsREF:Near unit="mm">68.50</nsREF:Near>
\t \t </nsREF:PD>
\t </nsREF:Measure>
</Ophthalmology>
私は次のように中央の球値を取得するために私のSQLクエリを入力しましたエラー
[エラー]が実行される(4:17):ORA-19228:XPST0008 - 宣言されていない識別子:接頭辞 'nsREF' ローカル名 'nsREF:測定'
をあなたは正しい値
ありがとうございました。それは魅力的なように働いています:) –