clear markdown compare help best fiddles feedback dbanow.uk
clear markdown donate comments/suggestions/bugs a leap of faith? bible365 diddy dollings
By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0. 2591607 fiddles created (45713 in the last week).

declare @XML xml = '<?xml version="1.0" encoding="utf-8"?> <config> <company> <Practice> <Code>0514</Code> <Name>Company A</Name> <ContactName>Alan Smith</ContactName> <ContactTel></ContactTel> <ContactMail>random@random.net</ContactMail> <SystemType>type A</SystemType> </Practice> </company> </config>'; select T2.lin.value('(./Code)[1]', 'char(6)') Code, T2.lin.value('(./Name)[1]', 'varchar(100)') Name, T2.lin.value('(./ContactName)[1]', 'varchar(100)') ContactName, T2.lin.value('(./ContactTel)[1]', 'varchar(15)') ContactTel, T2.lin.value('(./ContactMail)[1]', 'varchar(100)') ContactMail, T2.lin.value('(./SystemType)[1]', 'varchar(100)') System into #tmp_Company2 from @XML.nodes('/config/company/Practice') T2(lin); select * from #tmp_Company2;
Code Name ContactName ContactTel ContactMail System
0514 Company A Alan Smith random@random.net type A
 hidden batch(es)