title: How can i return error messages as select statement SQL server 2008?
body: <p>In SQL SERVER 2008 how can i return error messages as select statement </p>
  
  <p><em>LIKE</em></p>
  
  <pre><code>SELECT ** FROM emp 
  </code></pre>
  
  <p><em>Will return the following error</em></p>
  
  <pre><code>    Msg 102, Level 15, State 1, Line 1
      Incorrect syntax near '*'.
  </code></pre>
  
  <p>i just need the 2nd line to be returned as <code>SELECT</code> statement </p>
  
  <p>I've tried @@ERROR but looks like it return just the error code </p>
  
  <p>What i'm doing is validating sql statements from the client side, so if there is a way of doing this with out hitting the server this will be good too i'm using VB </p>
  
  <p>Thanks </p>