jain cj wrote
> 
> 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

Forget
AND rownum  >0
rownum can't be <= 0, therefore this predicate is superfluous, wrong
and causes the trouble

Elke
SAP Labs Berlin

BTW: Why do ypu write a select using a FROM-select if a normal one
would be sufficient???
SELECT *, rownum FROM SI_MonetaryHistory
where rownum  < 5

_______________________________________________
sapdb.general mailing list
[EMAIL PROTECTED]
http://listserv.sap.com/mailman/listinfo/sapdb.general

Reply via email to