This is the select statement I was trying to use, this works on another machine with the same version of Oracle 8.1.6...... but get an error on mine?
SELECT
avg_temp,
month, year,
to_char(avg(avg_temp)
OVER (order by year,month rows between 11 preceding and current row),
'99D9')
as avg_year_temp from scottish_weather;
This is a guess, but the analytical functions (of which Over is one) were new to Oracle 8i but were not fully supported. For instance, you could use them in a query in SQL*Plus, but you could not use them in PL/SQL unless you used dynamic SQL. I believe they are fully supported in Oracle 9i.
You didn't say in what environment you were trying to run the query, but perhaps you are using a tool that doesn't support the functions.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.