Q&A for active researchers, academics and students of physics
-- Q2596904 - T-SQL XML Query, how to seperate matching nodes into individual rows? create table #t (data xml) insert #t values (' <parent> <child> <name>Sally</name> </child> <child> <name>Bobby</name> </child> </parent> ') insert #t values (' <parent> <child> <name>Fred</name> </child> <child> <name>Bill</name> </child> </parent> ') select C.* from #t cross apply (select name.value('name[1]', 'varchar(255)') as [Name] from data.nodes('//parent/child') as c(name)) as C