title: Check if sqlcmd was successful
body: <p>I am using sqlcmd to run an sql query in a batch file. I would then like to – depending on if the sql query has been successfuly executed or not – do something.</p>
  
  <pre><code>sqlcmd -some flags -Q "Query"
  iF successful (
      do this
  ) ELSE (
      do that
  )
  </code></pre>
  
  <p>Thanks – I am new to batch programming by the way.</p>