title: How to add a separator when accessing two different fields from different tables in SQL
body: <pre class="lang-sql prettyprint-override"><code>DECLARE @test1 varchar = 'This is test 1';
  DECLARE @test2 varchar = 'This is test 2';
  
  SELECT 
          'Expected output' = isnull(@test1, '') + '. ' +  isnull(@test2, '')
  </code></pre>
  <p>Expected output should be &quot;This is test 1. This is test 2&quot;. But if there is nothing in <code>@test1</code> then do not show the &quot;. &quot; separator.</p>
  <p>Hope someone can help me out.</p>