Use the following
SELECT Doc.value('data((/OrganisationAccountOpeningForm/KYCCustomer/EntryDate)[1])','datetime')
or syntactically
SELECT <XML Column Name>.value('data((/<XPATH>)[<1-based index into possible values returned>])','<Format to convert the XML value into>')
See also http://msdn.microsoft.com/en-us/library/ms345117(SQL.90).aspx
Be the first to rate this post
Tags: xml, sql
Code | SQL | Work
Powered by BlogEngine.NET 1.4.5.0 Theme by Mads Kristensen