Hi
Do you have access to SQL Server what happens when you write the same query in SQL ,how are you connecting to AR system database ?
As per my understanding ROWNUM is not available in SQL SERVER ,you can try using RANK () or ROW_NUMBER keyword in sql server 2005
in sql server 2000 use code as below
Select *,(Select count(*) from table a cnt
where a.id >= o.id) as RowID
FROM table o
order by rowid
Cheers
Rahul
Edited by rahulwalawalkar - 18 Dec 2008 at 3:33am