Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: View based on a procedure

RE: View based on a procedure

From: Clarke, Andrew <andrew.clarke_at_logicacmg.com>
Date: Mon, 19 Feb 2007 15:26:42 -0000
Message-ID: <2BE0472753FAFA4A86DB33C3D02CBB1B01F4479C@uk-ex002.groupinfra.com>


The problem lies in the

>> The procedure does a lot of heavy calculations writes to a table. >> And the view should read from that table.

Doing DML in a function requires the use of the autonomous_transaction pragma, which is fraught with problems. What should the query do if the insert fails?

Cheers, APC

-----Original Message-----
From: oracle-l-bounce_at_freelists.org
[mailto:oracle-l-bounce_at_freelists.org] On Behalf Of Mladen Gogala Sent: 19 February 2007 14:28
To: mark_ai_at_yahoo.com
Cc: oracle-l_at_freelists.org
Subject: Re: View based on a procedure

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

--
http://www.freelists.org/webpage/oracle-l




This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you.
--
http://www.freelists.org/webpage/oracle-l
Received on Mon Feb 19 2007 - 09:26:42 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US