Offset and limit in sqlserver2005

Hi,
I am using sqlserver2005 as my database.I am facing problem in when i
give limit and offset in the query.

Eg : @books=Book.find(:all,
:limits=>1,:offset=>2
)

SELECT * FROM (SELECT TOP 1 * FROM (SELECT TOP 2 id,name FROM books
WHERE ( status=‘Approved’) ) AS tmp1 ) AS tmp2

query is executing like this…its not working…if any one knows how to
use limits and offsets in sqlserver2005

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs