Home » SQL & PL/SQL » SQL & PL/SQL » LEAD and LAG
LEAD and LAG [message #12939] Sat, 12 June 2004 00:10 Go to next message
pooja
Messages: 31
Registered: September 1999
Member
hai all

i'm trying to use LEAD and LAG functions but i can't.

i have one table called a(a number b number);

the data in this is

(1,2)(2,3)(3,4)(6,7)(7,8)

i wrote one query as

select a,b,lag(a,1,0)over(order by a) "next" from a;

but this is giving error as "no from----"

wat i want actually is to find the gaps in b/w a and b .

the same case happens with LEAD,PARTITION,and max all analytical funs but i'm using oracle 8i only..plz tell me my mistake soon

 
Re: LEAD and LAG [message #12941 is a reply to message #12939] Sat, 12 June 2004 11:41 Go to previous messageGo to next message
Ranjit Bisoyi
Messages: 18
Registered: November 2001
Junior Member
What is the error message and which version do you use?

If I'm not wrong this function is introduced on Oracle 8.1.6 Version.

I'm using the following version and this supports this.
##
Oracle8i Enterprise Edition Release 8.1.7.4.0 - Production
You can query this from v$version.
##

Good Luck.

RKB
Re: LEAD and LAG [message #12947 is a reply to message #12941] Sun, 13 June 2004 13:03 Go to previous message
Barbara Boehmer
Messages: 9106
Registered: November 2002
Location: California, USA
Senior Member
In addition to being introduced in Oracle 8.1.6, the analytic functions like lead and lag also required the Enterprise Edition, not the Personal Edition or 8iLite, even though the documentation may incorrectly state otherwise.
Previous Topic: table creation
Next Topic: clear logfile
Goto Forum:
  


Current Time: Wed Jul 30 09:09:59 CDT 2025