-2

I have below format of xml.

enter image description here

need to show this data below table format.

Table Format

4

1 Answer 1

11

Once you've made your XML valid, use nodes

select 
    t.x.value('FacilityID[1]','int') as FacilityID,
    t.x.value('Category[1]','int') as CategryID
from @yourxml.nodes('/Facilities/Facility') t(x)
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.