title: Looking for most efficient way to write this INSERT query
body: <p><strong>Looking for most efficient way to write this INSERT query (and least code):</strong></p>
  
  <pre><code>INSERT INTO [exportnote] (
      [versionnumber],
      [createdate],
      [LabAccessioningNumber],
      [Text],
      [exporttestresultreportid]
  ) 
  SELECT 
      1,
      GETDATE(),
      @lan,
      notetemp.notetext,
      @new_exporttestresultreportid
  FROM 
  (
      SELECT dbo.[note].notetext
      FROM dbo.[note] 
      WHERE  
          [note].notetypeid IN (15,17) -- SAMPLE NOTES  possibly 5,3
          AND [note].noteobjectid = @sampleid -- dbo.[sample].sampleid
          AND [note].active = 1 
  
      UNION ALL
  
      SELECT 
          dbo.[note].notetext
      FROM 
          dbo.[note]
      WHERE 
          [note].notetypeid IN (11) -- CLIENT NOTES
          AND [note].noteobjectid = @clientid -- dbo.[client].clientid
          AND [note].active = 1
  
      UNION ALL
  
      SELECT 
          dbo.[note].notetext
      FROM 
          dbo.[note]
      WHERE 
          [note].notetypeid IN (2,7) -- TEST NOTES
          AND [note].noteobjectid = @testid -- dbo.[test].testid
          AND dbo.[note].active = 1
  ) AS notetemp   
  </code></pre>