This isn't OJB related, so far as I can tell.  I'm new to OJB.  

Anyway, this query doesn't return any results correct?  The reason is
that rownum never has a chance to get to 5 since rownum is generated
after a result passes the conditions.  To correct this, do something
like

select * from (select rownum as aRowNum from aTable WHERE rownum <= 15)
where aRowNum >= 5

Regards,


Dave



> -----Original Message-----
> From: Lopez Vellon, Ignacio [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, July 16, 2003 11:36 AM
> To: [EMAIL PROTECTED]
> Subject: complex SQL
> 
> 
> I am using OJB for a month without any problem , but today i 
> wanted execute something like this :
> 
>                       select * FROM 
>               
>                       (SELECT rownum numFile, A0.MS_NB_USUARIO_ALTA
>                              FROM OPENCOWNER.CRM_V_EXPEDIENTE A0 
>                                WHERE A0.MS_NB_USUARIO_ALTA = '1') 
> 
>               WHERE numFile >= '5' AND numFile <= '15'
> 
> and i do not know how do it, i read the documentation and I 
> did not find a solution
> 
> I am using Oracle 9i database .
> 
>               does anyone know how to do it ?
> 
>                       thank you.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to