Hi, Everyone:
I have a sql script which using Openxml to retrive the
recordset from XML document.
The script ran successfully in query analyzer in my local
SQL Server 2000 instance. However when I ran it in remote
Dev SQL Server 2000 instance, it created an error message
(the script file still in my local machine):
Server: Msg 156, Level 15, State 1, Line 25
Incorrect syntax near the keyword 'WITH'.
It seems that the instance can not recognize the Openxml
statement.
Anyone know that why this error happen. Is any dll missing
in Dev database or I need to copy the script to Database
server?
Thanks!
Here is the XML document(excerpt from book: SQL Server
2000 Stored procedure programming)
-- sample XML document
'<root>
<Equipment EquipmentID="1" Make="Toshiba" Model="Portege
7020CT">
<Inventory InventoryID="5" StatusID="1"
EquipmentID="1"/>
<Inventory InventoryID="12" StatusID="1"
EquipmentID="1"/>
</Equipment>
<Equipment EquipmentID="2" Make="Sony" Model="Trinitron
17XE"/>
<Equipment EquipmentID="4" Make="HP" Model="LaserJet 4"/>
<Equipment EquipmentID="5" Make="Bang & Olafson"
Model="V4000">
<Inventory InventoryID="8" StatusID="1"
EquipmentID="5"/>
</Equipment>
<Equipment EquipmentID="6" Make="NEC" Model="V90">
<Inventory InventoryID="6" StatusID="2"
EquipmentID="6"/>
</Equipment>
</root>'
--Load the XML document into memory.
-- SELECT statement using OPENXML rowset provider
SELECT *
-- remove the XML document from memory