title: Invalid query syntax
body: <p>I have a query like so: <code>SELECT TOP 20 a.Job_No FROM dbo.ScheduledatesFF</code> Which gives me the first 20 results, but I want to start at 20 and get 20 results, how do I set an Offset?</p>
  
  <p>I tried: OFFSET 20 at the end of the query and I got this error:</p>
  
  <pre><code>Incorrect syntax near 'OFFSET'
  </code></pre>
  
  <p>I know in mysql its Offset, is it something different in SQL?</p>
  
  <p>This gives me an error:</p>
  
  <pre><code>SELECT 
      a.Job_No 
  FROM (
      SELECT 
          ROW_NUMBER() OVER (ORDER BY a.Job_No) as RowNum 
      FROM dbo.ScheduledatesFF 
      FROM dbo.ScheduledatesFF AS a 
      INNER JOIN dbo.tblCustomers AS c 
          ON a.Job_No = c.Job_No 
      INNER JOIN dbo.scheduledatesSS AS z 
          ON a.Job_No = z.Job_No 
      LEFT OUTER JOIN dbo.maxscheddate AS m 
          ON a.Job_No = m.Job_No
          ) AS MyDerivedTable 
  WHERE MyDerivedTable.RowNum BETWEEN 0 AND 20
  
  Incorrect syntax near the keyword 'FROM'.
  </code></pre>
  
  <p>This is the closest I have come:</p>
  
  <pre><code>SELECT a.Job_No, ROW_NUMBER() OVER (ORDER BY a.Job_No) as datacounter FROM dbo.ScheduledatesFF AS a INNER JOIN dbo.tblCustomers AS c ON a.Job_No = c.Job_No INNER JOIN dbo.scheduledatesSS AS z ON a.Job_No = z.Job_No LEFT OUTER JOIN dbo.maxscheddate AS m ON a.Job_No = m.Job_No
  </code></pre>
  
  <p>but in the where clause for datacounter it says it does not exists</p>