XMLデータをvarchar(200)
の列に格納するベンダーアプリケーションのテーブルがあります。構造化されていないXMLを列に変換する
表構造とサンプルデータはこちら
declare @table table
(
MerchantID int not null
,Data varchar(200) not null)
insert into @table
select 1, '<product><productID>1</productID><pdesc>ProductDesc</pdesc></product>'
union all
select 2, '<product><itemid>1</itemid><itemname>name of item</itemname></product>'
あるストアドプロシージャに以下のような関係フォーマットに生のXMLデータを変換する方法はありますか? MerchantID
パスは2出力は
MerchantID itemid itemname
2 1 name of item
これがそう手順は –