0
我有一個SQL查詢可以返回n行的數量。每行都有下面提到的示例XML。我想讀取樣本計劃編號&插入臨時表。 請幫幫我。通過XML循環和讀取值
請參見下面的示例XML:
<AvailSampleUpdateRS xmlns="http://www.abcconnect.com/EQC/AR/2007/02">
<Success>
<Warning code="1011">Sample date 2016-12-30; Room Type ID 20583; Sample Plan ID 207782211; Inactive Sample Plan Updated Ref=[b44d7e4e-cf66-11e6-950b-e19b2852ebb6] </Warning>
<Warning code="1022">Sample date 2016-12-31; Room Type ID 20583; Sample Plan ID 207782211; Inactive Sample Plan Updated Ref=[b44d7e4e-cf66-11e6-950b-e19b2852ebb6] </Warning>
<Warning code="7023">Sample date 2017-01-02; Room Type ID 20583; Sample Plan ID 203619420; Inactive Sample Plan Updated Ref=[b44d7e4e-cf66-11e6-950b-e19b2852ebb6] </Warning>
<Warning code="1011">Sample date 2017-01-03; Room Type ID 20583; Sample Plan ID 203619420; Inactive Sample Plan Updated Ref=[b44d7e4e-cf66-11e6-950b-e19b2852ebb6] </Warning>
<Warning code="7025">Sample date 2017-01-04; Room Type ID 20583; Sample Plan ID 203619420; Inactive Sample Plan Updated Ref=[b44d7e4e-cf66-11e6-950b-e19b2852ebb6] </Warning>
</Success>
</AvailSampleUpdateRS>
感謝,
嘗試[XML查詢](https://docs.microsoft.com/en-us/sql/t-sql/xml/query-method-xml-data-type) – ASpirin