title: Finding the n-th row in Sybase ASE?
body: <p>I'm trying to find the n-th row in a sybase database. I'm more familiar with SQL server so I decided to use a with statement but for some reason that's not working in sybase. Could you guys please explain what's wrong with this code:</p>
  
  <pre><code>With test AS 
  (
    select *, row_number() over (order by M_MAT) as 'row'
    from OM_MAT_DBF
  ) 
  SELECT *
  FROM test
  WHERE row = 2
  </code></pre>