title: Creating SQL query with line breaks in a single string
body: <p>In the SQL Server Management Studio I create a new query and then I run the following code:</p>
  
  <pre><code>select dbName.dbo.ScalarFunction()
  union
  select dbName2.dbo.ScalarFunction()
  </code></pre>
  
  <p>Then I try to do the same thing from my C# program. However I am having trouble to translate the above to one Query string. I have tried the following, but without any success:</p>
  
  <pre><code>string QueryString = @"select dbName.dbo.ScalarFunction() /r/n union /r/n select dbName2.dbo.ScalarFunction()"
  </code></pre>
  
  <p>and </p>
  
  <pre><code>string QueryString = @"select dbName.dbo.ScalarFunction(); union; select dbName2.dbo.ScalarFunction();"
  </code></pre>
  
  <p>and </p>
  
  <pre><code>string QueryString = @"select dbName.dbo.ScalarFunction(); union select dbName2.dbo.ScalarFunction();"
  </code></pre>
  
  <p>I am very new to SQL so if anyone could help me with the correct syntax I would be very happy! Thanks in advance! </p>