Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Next and Previos Row in the Table
Hello Alex,
thank you for your invaluable advices very much. I'll take them in mind
certainly.
But now calm down and reread original post. As you can see there is definite
criterion of "previous" and "next" record (as you said "This order is
defined by you"). And I just reply to the answer, no more no less.
Moreover I'm afraid that LEAD and LAG don't appropriate solution for Munda's
problem.
Thanks again.
Regards,
-- Roman Mirzaitov Brainbench MVP for Oracle Administration www.brainbench.com "Alex Filonov" <afilonov_at_yahoo.com> wrote in messageReceived on Tue Jun 11 2002 - 22:45:20 CDT
> There is no Previous and Next records in Oracle tables! There is no order
> whatsoever! Please read documentation, guys! You don't need to read
everything,
> but you have to read Concepts and SQL Language Reference, at least. And
you need
> to know the basics of Relational theory.
>
> Now, back to the question. Obviously, you need next and previous record
based on
> some order. This order is defined by you, this is not the order in the
table.
> This can be done using analytic functions, LEAD and LAG in this case.