View Full Version : access query with row range limitation


mchoud2
03-03-2009, 02:07 AM
Dear Sir

I need your help about Ms Access query with row range limitation.

I have my ms access table like this :

1. Kholid
2. Dedi
3. Eliza
4. Rauf
5. Budi

I want to select for row >1 and row <4 only. with result like this :

2. Dedi
3. Eliza
4. Rauf


If using oracle table, i can giving the sql command like this :
select * from mytable where rownum>1 and rownum<5

How do i can execute with access query for expected result like above ?

Thanks for any kind help.
Best Regards
Mchoud

khawar
03-03-2009, 02:34 AM
You can use
select * from mytable where rownumber between 2 and 4

mchoud2
03-03-2009, 04:23 AM
You can use

select * from mytable where rownumber between 2 and 4

There is a msgbox appeared it is Enter parameter value rownumber :

I think this occured because access have no rownumber.

So your sql command was not applicable in access query.

Thanks
Mchoud

khawar
03-03-2009, 04:38 AM
ok i thought you have a column in you table named rownumber it was a misunderstanding