TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Venkatesh Pettem
NA
343
9.5k
How to read xml nodes data
Jul 2 2019 3:18 AM
I'm trying to read xml node in sql server, i couldn't able to read the node data, can any one help me,
Below is xml Content:
<entry>
<entryRelationship typeCode="SUBJ">
<encounter classCode="ENC" moodCode="EVN">
<code code="32485007" codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMED-CT"/>
<sdtc:dischargeDispositionCode code="428371000124100" codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMED-CT"/>
</encounter>
</entryRelationship>
</act>
</entry>
The bold node im not able to read. Below im trying in sql server
select
Code = x.v.value('(code/@code)[1]', 'VARCHAR(100)') ,
DispositionCode= x.v.value('(------?-------)[1]', 'VARCHAR(100)')
FROM @XMLValue.nodes('entry/entryRelationship/encounter') x(v)
Reply
Answers (
1
)
Blue icon with question mark on SSMS 18.0?
Problem when i Import data from Access