title: How Can I Split A SQL Statement String Into Multiple Lines?
body: <pre><code>DECLARE @NewLineChar AS CHAR(2) = CHAR(13) + CHAR(10)
  DECLARE @STRING VARCHAR(MAX)
      SET @STRING ='SELECT FirstLine AS FL SELECT SecondLine AS SL'
    PRINT LEN(@STRING)
    PRINT @STRING+
          CASE 
            WHEN LEN(@STRING)&gt;2 THEN (@STRING+@NewLineChar)
            ELSE @STRING 
           END
  </code></pre>