title: SQLite combine two columns
body: <p>This query returns two separate columns containing operating system information, since the data is automatically written into the DB table based on a scanning tool I am unable to manually alter the columns. I am attempting to write a query that combines the two rows into one (filling in the blanks from the operating_system row with the data in the operating_system_version row. </p>
  
  <p>The query I have now is as follows:</p>
  
  <pre><code>SELECT device_type, operating_system, operating_system_version
  FROM DEVICES
  WHERE user_name like '|%front-%|'
  OR user_name like '|%back-%|'
  OR user_name like '|%ap-%|'
  OR user_name like '|%me-%|'
  OR user_name like '|%mg-%|'
  </code></pre>
  
  <p>and it returns:</p>
  
  <pre><code>device_type    operating_system        operating_system_version
  
  
  desktop         windows xp
  desktop                                 windows 7 professional
  desktop         windows xp              
  desktop                                 windows 7 professional
  </code></pre>
  
  <p>I would like it to return something like this:</p>
  
  <pre><code>device_type    OS
  
  
  desktop         windows xp
  desktop         windows 7 professional                        
  desktop         windows xp              
  desktop         windows 7 professional  
  </code></pre>
  
  <p>I've tried adding in || like below but it returned no data:</p>
  
  <pre><code>SELECT device_type, operating_system||operating_system_version
  FROM DEVICES
  WHERE user_name like '|%front-%|'
  OR user_name like '|%back-%|'
  OR user_name like '|%ap-%|'
  OR user_name like '|%me-%|'
  OR user_name like '|%mg-%|'                       
  </code></pre>