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: M. Alroy Mascrenghe <mark_ai_at_yahoo.com>
Date: Mon, 19 Feb 2007 21:30:39 -0800 (PST)
Message-ID: <83304.39617.qm@web36815.mail.mud.yahoo.com>


Tthanks Guys, for all your replies esp for reminding about the autonomous transactions and table() I was able to solve the problem thru these

"Clarke, Andrew" <andrew.clarke_at_logicacmg.com> wrote: 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.


 
---------------------------------
Now that's room service! Choose from over 150,000 hotels 
in 45,000 destinations on Yahoo! Travel to find your fit.
--
http://www.freelists.org/webpage/oracle-l
Received on Mon Feb 19 2007 - 23:30:39 CST

Original text of this message

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