Home » SQL & PL/SQL » SQL & PL/SQL » AVG() on a nested table (Oracle 10g)
AVG() on a nested table [message #308824] Tue, 25 March 2008 10:21 Go to next message
Messages: 5
Registered: March 2008
Junior Member

I have created a nested table of type number the type being defined globally. I populate the values into the table and then i need to calculate the average of that.

Any ideas as to how to go about this. This is my query

SELECT AVG() INTO v_avg_nav FROM TABLE(v_tt_nav);

I donno what to pass into the AVG() method ?

Re: AVG() on a nested table [message #308826 is a reply to message #308824] Tue, 25 March 2008 10:25 Go to previous message
Messages: 3186
Registered: April 2005
Location: Heilbronn, Germany
Senior Member
What is the column called when you run a

select * FROM TABLE(v_tt_nav);


When I used such casts it is usually called COLUMN_VALUE. Then a


will work.

[Updated on: Tue, 25 March 2008 10:28]

Report message to a moderator

Previous Topic: Derived table access
Next Topic: What is the Main Difference b/w synonym and public synonym?
Goto Forum:

Current Time: Tue Oct 25 04:15:01 CDT 2016

Total time taken to generate the page: 0.07392 seconds