title: Call SQLCMD from java 7
body: <p>I am facing an error executing sqlcmd from Java. My code is below:</p>
  
  <pre><code>Process process = Runtime.getRuntime()
                           .exec("sqlcmd -m-1 -S localhost,1433 -d my_server -U sa 
                                  -P abc -Q \"select * from Assests where AssetID &gt; 
                                  'G123204E4-1234-4A31-B37B-0092D68DA429'\" -k2 -W 
                                  -h-1 -s\",\" -o \"D://Assests.csv\"");
  </code></pre>
  
  <p>While running sqlcmd from sqlclient its working fine but from Java it is giving the following expression error: </p>
  
  <blockquote>
    <p>Msg 4145, Level 15, State 1, Server SANDEEPB-PC, Line 1 An expression
    of non-boolean type specified in a context where a condition is
    expected, near 'AssetID'.</p>
  </blockquote>
  
  <p>Yet, when I change ">" to "=", it works fine. </p>
  
  <p>Can someone please tell me why this is happening and what I can do about it?</p>