Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
What's wrong with this...?
Message
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Title:
What's wrong with this...?
Miscellaneous
Thread ID:
00739078
Message ID:
00739078
Views:
65
declare @idoc int
declare @answers varchar(100)

set @answers = '<root><answer>123x4x5x6x789</answer><answer>xxx xxxx xxxx xx x xx</answer></root>'

EXECUTE sp_xml_preparedocument @idoc OUTPUT, @answers

select * 
FROM OPENXML (@idoc, '/root/answer', 2) WITH (answer  varchar(100))
Ive done this a few times now and I dont understand why its not working. I keep getting two null rows, instead of the values. Its probably something stupid that I cant see.
Next
Reply
Map
View

Click here to load this message in the networking platform