RRinTetons
IS-IT--Management
Continuing in my quest to access data stored as XML.
Using an example from I get very close.
The xpath was extracted using XMLSpy and has been shown to work to locate the data. The problem is the final SELECT. I *think* what I should get is a list of the ClientCodes from all the Orders stored in the XML. When I execute that I get:
I'm cookbooking this from the beyondrelational site's example, so I could be making some really obvious mistake, but it seems like it should work.
????
-
Richard Ray
Jackson Hole Mountain Resort
Using an example from I get very close.
Code:
DECLARE @t TABLE (DATA XML)
INSERT INTO @t([DATA])
SELECT [ox].[XMLText]
FROM [dbo].[OrderXML] AS ox
SELECT [DATA].[VALUE]('/MyApp.Framework.DAL.Order/ClientCode','CHAR(3)') AS [ClientCode]
FROM @t
The xpath was extracted using XMLSpy and has been shown to work to locate the data. The problem is the final SELECT. I *think* what I should get is a list of the ClientCodes from all the Orders stored in the XML. When I execute that I get:
Code:
Msg 227, Level 15, State 1, Line 11
"VALUE" is not a valid function, property, or field.
I'm cookbooking this from the beyondrelational site's example, so I could be making some really obvious mistake, but it seems like it should work.
????
-
Richard Ray
Jackson Hole Mountain Resort