title: How to split one column value into 2 separate columns in SQL Server?
body: <pre><code>Select physical_name 
  From Sys.database_files
  </code></pre>
  
  <p>How to split the out put file path into 2 parts?</p>
  
  <p>For example:</p>
  
  <pre><code>Select physical_name 
  From Sys.database_files
  </code></pre>
  
  <p>produces this output:</p>
  
  <pre><code>C:\Program Files\Microsoft SQL Server\MSSQL12.MSSQLSERVER\MSSQL\DATA\master.mdf
  C:\Program Files\MSSQL\DATA\muser.mdf
  </code></pre>
  
  <p>which I'd like to change to:</p>
  
  <pre><code>Col1                                                                   col2
  ----------------------------------------------------------------------------------
  C:\Program Files\Microsoft SQL Server\MSSQL12.MSSQLSERVER\MSSQL\DATA   master.mdf
  C:\Program Files\MSSQL\DATA                                            muser.mdf
  </code></pre>