We have 100 records(tbl_name), now we create the 4 views(viw_1, viw_2, viw_3, viw_4) for each 25 records. It means 1st is first top 25, 2nd is second top 25 and so on.
Can u help me?
You will have to use 'top n' query. Syntax can be found in Oracle documentation.
A crude method is to use the ROWNUM pseudocolumn. Eg Select * from your_table where rownum between 25 and 50;
------------------ However, I must ask - why in the world do you want to do this at all? It is a very odd request.
-------------------
I use it quite regularly where the client requires the data to be seperated in 4-5 sets and then apply different rules on each set.
You can do it as
select *
from ( select a.*, rownum rnum
from ( YOUR_QUERY_GOES_HERE -- including the order by ) a
where rownum <= MAX_ROWS )
where rnum >= MIN_ROWS
-- Anurag.
OCP Application Developer
---------------------------------------------------------
"Be not afraid of growing slowly. Be afraid only of standing still."
Bookmarks