我試圖提取如下XML形式爲行和列,但沒有得到它想要的格式轉換使用XMLTABLE和XPath
XML XML的Clob: -
<QualificationCriterion name="iPass Roaming Zone 1" description="" id="##PC4.0##183647208" status="CheckedIn" kind="Implementation" eventName="##PC4.0##67625472">
<Condition xsi:type="LogicalExpression" expressionType="AND" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Operands>
<Operand xsi:type="LogicalExpression" expressionType="AND">
<Operands>
<Operand xsi:type="Comparison" expressionType="NE" type="Boolean">
<LeftOperand xsi:type="AttributeRef" type="##PC4.0##6249415" entity="Event" entityName="##PC4.0##67625472" attributeName="Service filter"/>
<RightOperand xsi:type="ValueRef" type="##PC4.0##6249415" name="Pseudo Allowance "/>
</Operand>
<Operand xsi:type="Comparison" expressionType="EQ" type="Boolean">
<LeftOperand xsi:type="AttributeRef" type="##PC4.0##76915825" entity="Customer" entityName="##PC4.0##701" attributeName="Last BLIMPACT Cycle Month"/>
<RightOperand xsi:type="ValueRef" type="##PC4.0##76915825" name="Wholesale"/>
</Operand>
</Operands>
</Operand>
<Operand xsi:type="LogicalExpression" expressionType="OR">
<Operands>
<Operand xsi:type="Comparison" expressionType="EQ" type="Boolean">
<LeftOperand xsi:type="AttributeRef" type="##PC4.0##6250817" entity="Event" entityName="##PC4.0##67625472" attributeName="Provider ID"/>
<RightOperand xsi:type="Constant" type="##PC4.0##8537479" value="23102"/>
</Operand>
<Operand xsi:type="Comparison" expressionType="EQ" type="Boolean">
<LeftOperand xsi:type="AttributeRef" type="##PC4.0##6250817" entity="Event" entityName="##PC4.0##67625472" attributeName="Provider ID"/>
<RightOperand xsi:type="Constant" type="##PC4.0##8537479" value="21630"/>
</Operand>
<Operand xsi:type="Comparison" expressionType="EQ" type="Boolean">
<LeftOperand xsi:type="AttributeRef" type="##PC4.0##6250817" entity="Event" entityName="##PC4.0##67625472" attributeName="Provider ID"/>
<RightOperand xsi:type="Constant" type="##PC4.0##8537479" value="26201"/>
</Operand>
<Operand xsi:type="Comparison" expressionType="EQ" type="Boolean">
<LeftOperand xsi:type="AttributeRef" type="##PC4.0##6250817" entity="Event" entityName="##PC4.0##67625472" attributeName="Provider ID"/>
<RightOperand xsi:type="Constant" type="##PC4.0##8537479" value="23001"/>
</Operand>
<Operand xsi:type="Comparison" expressionType="EQ" type="Boolean">
<LeftOperand xsi:type="AttributeRef" type="##PC4.0##6250817" entity="Event" entityName="##PC4.0##67625472" attributeName="Provider ID"/>
<RightOperand xsi:type="Constant" type="##PC4.0##8537479" value="23203"/>
</Operand>
<Operand xsi:type="Comparison" expressionType="EQ" type="Boolean">
<LeftOperand xsi:type="AttributeRef" type="##PC4.0##6250817" entity="Event" entityName="##PC4.0##67625472" attributeName="Provider ID"/>
<RightOperand xsi:type="Constant" type="##PC4.0##8537479" value="20420"/>
</Operand>
<Operand xsi:type="Comparison" expressionType="EQ" type="Boolean">
<LeftOperand xsi:type="AttributeRef" type="##PC4.0##6250817" entity="Event" entityName="##PC4.0##67625472" attributeName="Provider ID"/>
<RightOperand xsi:type="Constant" type="##PC4.0##8537479" value="23207"/>
</Operand>
<Operand xsi:type="Comparison" expressionType="EQ" type="Boolean">
<LeftOperand xsi:type="AttributeRef" type="##PC4.0##6250817" entity="Event" entityName="##PC4.0##67625472" attributeName="Provider ID"/>
<RightOperand xsi:type="Constant" type="##PC4.0##6250817" value="21901"/>
</Operand>
<Operand xsi:type="Comparison" expressionType="EQ" type="Boolean">
<LeftOperand xsi:type="AttributeRef" type="##PC4.0##6250817" entity="Event" entityName="##PC4.0##67625472" attributeName="Provider ID"/>
<RightOperand xsi:type="Constant" type="##PC4.0##6250817" value="20416"/>
</Operand>
<Operand xsi:type="Comparison" expressionType="EQ" type="Boolean">
<LeftOperand xsi:type="AttributeRef" type="##PC4.0##6250817" entity="Event" entityName="##PC4.0##67625472" attributeName="Provider ID"/>
<RightOperand xsi:type="Constant" type="##PC4.0##6250817" value="22004"/>
</Operand>
</Operands>
</Operand>
<Operand xsi:type="LogicalExpression" expressionType="OR">
<Operands>
<Operand xsi:type="Comparison" expressionType="EQ" type="Boolean">
<LeftOperand xsi:type="AttributeRef" type="##PC4.0##6249415" entity="Event" entityName="##PC4.0##67625472" attributeName="Service filter"/>
<RightOperand xsi:type="ValueRef" type="##PC4.0##6249415" name="ROAMBL"/>
</Operand>
<Operand xsi:type="Comparison" expressionType="EQ" type="Boolean">
<LeftOperand xsi:type="AttributeRef" type="##PC4.0##6249415" entity="Event" entityName="##PC4.0##67625472" attributeName="Service filter"/>
<RightOperand xsi:type="ValueRef" type="##PC4.0##6249415" name="ROAMGP"/>
</Operand>
<Operand xsi:type="Comparison" expressionType="EQ" type="Boolean">
<LeftOperand xsi:type="AttributeRef" type="##PC4.0##6249415" entity="Event" entityName="##PC4.0##67625472" attributeName="Service filter"/>
<RightOperand xsi:type="ValueRef" type="##PC4.0##6249415" name="GPRSRM"/>
</Operand>
</Operands>
</Operand>
</Operands>
</Condition>
</QualificationCriterion>
所需的輸出: -
NAME value1 value2 value4
iPass Roaming Zone 1 Service filter Pseudo Allowance AND
iPass Roaming Zone 1 Last BLIMPACT Cycle Month Wholesale AND
iPass Roaming Zone 1
iPass Roaming Zone 1 Provider ID 23102 OR
iPass Roaming Zone 1 Provider ID 21630 OR
iPass Roaming Zone 1 Provider ID 26201 OR
iPass Roaming Zone 1 Provider ID 23001 OR
iPass Roaming Zone 1 Provider ID 23203 OR
iPass Roaming Zone 1 Provider ID 20420 OR
iPass Roaming Zone 1 Provider ID 23207 OR
iPass Roaming Zone 1 Provider ID 21901 OR
iPass Roaming Zone 1 Provider ID 20416 OR
iPass Roaming Zone 1 Provider ID 22004 OR
iPass Roaming Zone 1
iPass Roaming Zone 1 Service filter ROAMBL OR
iPass Roaming Zone 1 Service filter ROAMGP OR
iPass Roaming Zone 1 Service filter GPRSRM OR
,什麼我得到:
NAME value1 value2 value3 value4
iPass Roaming Zone 1 AND
iPass Roaming Zone 1 Service filter
iPass Roaming Zone 1 Pseudo Allowance
iPass Roaming Zone 1 Last BLIMPACT Cycle Month
iPass Roaming Zone 1 Wholesale
iPass Roaming Zone 1 OR
iPass Roaming Zone 1 Provider ID
iPass Roaming Zone 1 23102
iPass Roaming Zone 1 Provider ID
iPass Roaming Zone 1 21630
iPass Roaming Zone 1 Provider ID
iPass Roaming Zone 1 26201
iPass Roaming Zone 1 Provider ID
iPass Roaming Zone 1 23001
iPass Roaming Zone 1 Provider ID
iPass Roaming Zone 1 23203
iPass Roaming Zone 1 Provider ID
iPass Roaming Zone 1 20420
iPass Roaming Zone 1 Provider ID
iPass Roaming Zone 1 23207
iPass Roaming Zone 1 Provider ID
iPass Roaming Zone 1 21901
iPass Roaming Zone 1 Provider ID
iPass Roaming Zone 1 20416
iPass Roaming Zone 1 Provider ID
iPass Roaming Zone 1 22004
iPass Roaming Zone 1 OR
iPass Roaming Zone 1 Service filter
iPass Roaming Zone 1 ROAMBL
iPass Roaming Zone 1 Service filter
iPass Roaming Zone 1 ROAMGP
iPass Roaming Zone 1 Service filter
iPass Roaming Zone 1 GPRSRM
對於每一個值提取,我得到3空白並連續 請幫助這個值,我在XML的新的和非常困惑,究竟我做錯了
我的答案有點快,我的答案是SQL Server語法......哪個DBMS是你的(供應商和版本)?標籤'sql'是不夠的... – Shnugo
由於下面的評論添加了'oracle10g'標籤... – Shnugo