title: Run large SQL query from a bat file
body: <p>I am trying to run a monthly extract from a SQL Express DB using a .bat file called from windows scheduler and the SQL query is large (about 50 lines) and I can't work out how to include such a large script in the bat file without it all being flattened out into one (long) single row of text. Is there a carriage return (or similar) command that I can use to keep the query in the readable SQL format like I have below?</p>
  
  <pre><code>SELECT a.[Application_Number]
    ,case when c_MNI &gt;0 then 
      100*(a.monthly_living_allowance +
      a.New_Home_Loan_Repayment_Amount +
      c_mc)/c_MNI 
    else 0 end as nsr_calc
    ,a.[FIN_Total_Net_Service_Ratio] as NSR
    ,a.Total_Annual_Income_Gross_Total as Annual_Gross
    ,a.fin_total_annual_income_net1 as Annual_Net
    ,C_MNI as MNI 
    ,C_MC  as MC
    ,a.[monthly_living_allowance] as MLA
    ,a.[Manual_MLA]
    ,a.[Manual_MLA_Flag] ....etc etc...
  </code></pre>