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
Deepali Patil
NA
8
488
XML SQL retrieval
Feb 3 2020 10:34 PM
Hi All,
I am trying to retrieve xml values dynamically as I don't know how many RuleIDs I will get. Here is my code. It's returning null
declare @world table(ID uniqueidentifier primary key default(newid()),Person xml)
insert into @world(Person) values('<Person>
<RuleID1>1</RuleID1>
<RuleID1>2</RuleID1>
</Person>')
select x.y.value('(RuleID1)[1]','int') from @world
cross apply Person.nodes('(/Person/*)') x(y)
Please help. I can get as many RuleID1 tags, its dynamic. I want all of its values
Thanks
Deepali
Reply
Answers (
1
)
Question abou Creating a EXE
How to find the exact word match