select versionid, procid, itemid, xsection.value('@OriginalSteps', 'char(1)') originalsteps, xprocedure.value('@SectionStart', 'int') sectionstart from 
(select versionid, procid, vi.itemid, cast(cc.config as xml) xconfig, cast(pcc.config as xml) xpconfig from vefn_GetVersionProcedureItems('') vi
join contents cc on vi.contentid = cc.contentid
join items pii on vi.procid = pii.itemid
join contents pcc on pcc.contentid = pii.contentid
where procid = 133172 and cc.type between 10000 and 19999) t1
cross apply xconfig.nodes('//Section') tsection(xsection)
cross apply xpconfig.nodes('//Procedure') tprocedure(xprocedure)