Rownum problem

"jain cj" <[email protected]> Tue, 02 Sep 2003 05:04:29 +0000
Newsgroups gmane.comp.db.sapdb.general
Message-ID <[email protected]>
Hi,

   I want to run a query like

select
   a.* , rownum r
FROM
   (SELECT * FROM SI_MonetaryHistory)  a
where rownum  < 5 AND rownum  >0

but giving error like (Running in Oracle mode...in fact the same error in 
Internal mode where i used rowno instead of rownum)

--- Error -------------------------------
Auto Commit: On, SQL Mode: Oracle, Isolation Level: Committed
General error;-7036 POS(97) ROWNO specification not allowed in this context.
select
   a.* , rownum r
FROM
   (SELECT * FROM SI_MonetaryHistory)  a
where rownum  < 5 AND rownum  >0

Please give me a solution

_________________________________________________________________
Over 6,70,000 brides and grooms. 
http://www.bharatmatrimony.com/cgi-bin/bmclicks1.cgi?74 Click here to join 
for free.