-2

I have below format of xml.

enter image description here

need to show this data below table format.

Table Format

KuldipMCA
  • 3,079
  • 7
  • 28
  • 48

1 Answers1

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)
podiluska
  • 50,950
  • 7
  • 98
  • 104