Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Openxml
Message
 
 
À
06/09/2005 09:34:19
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Titre:
Divers
Thread ID:
01046975
Message ID:
01047005
Vues:
18
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--
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform