Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: query question
"Karl Hungus" <nnnnndddddd_at_hotmail.com> wrote in message
news:kC%ac.1255$WA4.733_at_twister.nyc.rr.com...
|
| > sql is set oriented, not record oriented, so this is not a typical way
to
| > use the language
| >
| > typically this functionality is best handled by buffering the PKs, or
the
| > actual records, via the UI tool
| >
| > could you describe your process and toolset (and versions would be good,
| > too)?
| >
| > ;-{ mcs
|
|
| Its a web front end. In this case its not practical to cache the pks.
| Basically just looking for a quick and dirty way to do it with SQL.
|
| TIA
|
|
actually, that's what i do with my web front ends (PL/SQL Web Toolkit, store PKs in hidden form fields, retrieve page at a time)
what are you implementing the interface with?
regarding the SQL approach (standard disclaimer should go here) you would need to determine some sort criteria and retrieve the first row greater than or less than the previously selected row:
for next row:
select *
from (
select * from emp where empno >= :current_empno -- or, if unique, just '>' and rowid <> :current_rowid -- not required if sort value is unique order by empno )
for previous row:
select *
from (
select * from emp where empno <= :current_empno -- or, if unique, just '<' and rowid <> :current_rowid -- not required if sort value is unique order by empno desc )
;-{ mcs Received on Thu Apr 01 2004 - 15:25:17 CST
![]() |
![]() |