title: Select TOP 1 * from Table Fails in Sybase Procedure
body: <p>Am trying to Fetch Only one record from the Sybase Table without using the RowCount Function, even though "WHERE Condition" returns multiple results.</p>
  
  <pre><code>SELECT TOP 1 EMPLOYEE_NAME FROM EMPLOYEES WHERE EMPLOYEEID &gt; 50
  </code></pre>
  
  <p>Runs Successfully with one Record Only,</p>
  
  <p>However</p>
  
  <pre><code>SELECT TOP 1 EMPLOYEE_NAME FROM EMPLOYEES WHERE EMPLOYEEID &gt; 50
  </code></pre>
  
  <p>fails, when written inside a Sybase Procedure as a Sub Query</p>