我有以下 XML
<NewDataSet>
<data name="AC_Capacity_Creation_Notification.Text">
<value>Activation successfull and sent for approval.</value>
<comments>AC Capacity</comments>
</data>
<data name="AC_Capacity_Modification_Daily_Notification.Text">
<value>Approved successfully..</value>
<comments>AC Capacity</comments>
</data>
<data name="AC_Capacity_Modification_Schedule_Notification.Text">
<value>Are you sure you want to close this form?</value>
<comments>AC Capacity</comments>
</data>
</NewDataSet>
我想将此 XML 中的数据获取到临时表中,我可以从中进一步查询,但无法这样做
我试过这样做:
EXEC sp_xml_PrepareDocument @intHandle OUTPUT, @XML
SELECT * into #tmp FROM OPENXML(@intHandle, '/NewDataset/data',2)
EXEC sp_xml_removedocument @intHandle
drop table #tmp
但我得到空行