Thursday, 15 May 2008

Oracle LAG function

A useful function for querying more than one record in the same table without having to join the table to itself. As it says here:

http://www.techonthenet.com/oracle/functions/lag.php

For an explanation of the PARTITION BY clause, look here:

http://www.orafusion.com/art_anlytc.htm