Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: SQL query
Thank you! But I have problems to SUM(X-LAG(X,1)): "ORA-30483: windows =
functions are not allowed here". How can I sum or compare (after WHERE) =
fields with analytical function LAG or LEAD?
Thanks!
Hu=E1scar
-----Mensaje original-----
De: oracle-l-bounce_at_freelists.org [mailto:oracle-l-bounce_at_freelists.org] =
En nombre de Stephane Faroult
Enviado el: Martes 18 de Mayo de 2004 16:27
Para: oracle-l_at_freelists.org
Asunto: Re: SQL query
Huascar Espinoza wrote:
>=20
>=20
>=20> =
> NRO_CORREL DATE_REF
>=20
>=20
>=20
>=20
Huascar,
Have a look at the lag() and lead() analytical functions. Order by date in the window attribute of the function, and compare NRO_CORREL to lag(NRO_CORREL).
--=20
Regards,
Stephane Faroult
Oriole Software
-- Archives are at http://www.freelists.org/archives/oracle-l/ FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html ----------------------------------------------------------------- ---------------------------------------------------------------- Please see the official ORACLE-L FAQ: http://www.orafaq.com ---------------------------------------------------------------- To unsubscribe send email to: oracle-l-request_at_freelists.org put 'unsubscribe' in the subject line. -- Archives are at http://www.freelists.org/archives/oracle-l/ FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html -----------------------------------------------------------------Received on Wed May 19 2004 - 08:57:12 CDT
![]() |
![]() |