I have a SQL query that looks like this:
SELECT foo \"c0\",
bar \"c1\",
baz \"c2\",
...
FROM some_table
WHERE ...
I
you cant have a view with 1000+ columns, so cheat a little.
select *
from foo f, foo2 f2
where (f.rowid, f2.rowid) in (select r, r2
from (select r, r2, rownum rn
from (select /*+ first_rows */ f.rowid r, f2.rowid r2
from foo f, foo2 f2
where f.c1 = f2.a1
and f.c2 = '1'
order by f.c1))
where rn >= AAA
and rownum <= BBB)
order by whatever;
now put any where clauses in the innermost bit (eg i put f.c1 = '1').
BBB = pagesize. AAA = start point