On 02/19/2007 02:06:26 AM, M. Alroy Mascrenghe wrote: > Guys > Is there a way to base a view/materialised view on a procedure? Everytime > the view is selected from the procedure must be run. The procedure does a lot > of heavy calculations writes to a table. And the view should read from that > table. I know DML in select wont work. Is there a workaround, can use some > other structure instead of a table in the procedure maybe like (varrays)? > You can create a pipelined procedure that returns PL/SQL table and then select * from table(proc), in a very similar fashion to select * from table(dbms_xplan.display); -- Mladen Gogala http://www.mladen-gogala.com -- //www.freelists.org/webpage/oracle-l