-2

I have below format of xml.

enter image description here

need to show this data below table format.

Table Format

KuldipMCA
  • 2,981
  • 7
  • 26
  • 48

1 Answers1

8

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)
podiluska
  • 50,144
  • 7
  • 94
  • 100