 <p>Here is solution using transforming string to XML which brings more freedom with result processing:</p> <pre><code>-- Prepare data for solution testing DECLARE @srctable TABLE ( Id INT, SnmpMessage VARCHAR(MAX), SnmpMessageXml XML ) INSERT INTO @srctable SELECT Id, SnmpMessage, SnmpMessageXml FROM ( VALUES (1, 'community=PUBLIC, enterprise=1.1.1.1.1.1.1.1.1.1.1, uptime=42170345, agent_ip=1.1.1.1, version=Ver2', null) ) v (Id, SnmpMessage, SnmpMessageXml) -- Transform source formatted string to XML string UPDATE @srctable SET SnmpMessageXml = CAST('&lt;row&gt;&lt;data ' + REPLACE(REPLACE(SnmpMessage, ',', '"/&gt;&lt;data '), '=', '="') + '"/&gt;&lt;/row&gt;' AS XML) -- Final select from XML data SELECT SnmpMessageXml.value('(/row/data/@community)[1]', 'VARCHAR(999)') AS community, SnmpMessageXml.value('(/row/data/@enterprise)[1]', 'VARCHAR(999)') AS enterprise, SnmpMessageXml.value('(/row/data/@uptime)[1]', 'VARCHAR(999)') AS uptime, SnmpMessageXml.value('(/row/data/@agent_ip)[1]', 'VARCHAR(999)') AS agent_ip, SnmpMessageXml.value('(/row/data/@version)[1]', 'VARCHAR(999)') AS version FROM @srctable AS t </code></pre>