Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Openxml
Message
 
 
To
06/09/2005 09:34:19
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Title:
Miscellaneous
Thread ID:
01046975
Message ID:
01047005
Views:
19
You've to learn XPATH in order to understand and implement ColPattern as shown in the script below. See http://winfx.msdn.microsoft.com/library/default.asp?url=/library/en-us/WD_XMLStd/html/6da1b6e3-256e-4919-8848-53b425f72ed1.asp

In short, 'CustomerID' references an XML element 'CustomerID' and '@CustomerID' references an attribute 'CustomerID'.

>In the ‘Using OPENXML’ of SQL 2000 Book Online. There are some examples.
>SELECT *
>FROM OPENXML (@idoc, '/ROOT/Customer/Order/OrderDetail',2)
>      WITH (OrderID     int         '../@OrderID',
>            CustomerID  varchar(10) '../@CustomerID',
>            OrderDate   datetime    '../@OrderDate',
>            ProdID      int         '@ProductID',
>            Qty         int         '@Quantity')
>
>
>SELECT *
>FROM OPENXML (@idoc, '/ROOT/Customer/Order/OrderDetail')
>      WITH (CustomerID  varchar(10)   '../CustomerID',
>            OrderDate   datetime      '../OrderDate',
>            ProdID      int           '@ProductID',
>            Qty         int           '@Quantity')
>What is @ ? What different between '../OrderDate' and '../@OrderDate'
>
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform