Saturday, September 22, 2012

Querying from an xml column Sql server


For instance you want to query the Names of all customers from  a customers column which is an xml, you need to provide the xpath of the particular element in xml from the xml in query()

 select CustomerName =<XmlColumn>.query('data(//Name)')

   from <Customer>

No comments:

Post a Comment