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

Home -> Community -> Usenet -> c.d.o.server -> Re: "instead of select" trigger

Re: "instead of select" trigger

From: Serge Rielau <srielau_at_ca.eye-be-em.com>
Date: Thu, 27 May 2004 14:53:19 -0400
Message-ID: <c95dfe$e8g$1@hanover.torolab.ibm.com>


Daniel Morgan wrote:

> Christian "Raistlin" Gulich wrote:
>

>> "dnh" <nogood_at_using.this.addr.com> schrieb im Newsbeitrag
>> news:40b2c233$1_at_cpns1.saic.com...
>>
>>> One word - VIEWS
>>
>>
>>
>> I have to pass parameters to the procedures, depending to the current 
>> query.
>> If it isn't possible, to get the querieng sql statement in a view to 
>> pass it
>> to the procedures, views are not  a solution for me.
>>
>> Christian

>
>
> It is often better to ask questions than to make statements that may
> or may not be true.
>
> You can pass parameters to view created with functions and also by
> using DBMS_APPLICATION_INFO. There is a demo showing this at:
> http://www.psoug.org/reference/dbms_applic_info.html
>
> In 10g you can, in fact, write the equivalent of an INSTEAD OF
> trigger for a select ... check out the ADDM.
>

Where I studied using any form of global variables beyond what is considered "stable environment setup" was frowned upon :-) I doubt the intent of the application info is to set up parameters for views. A table function is a lot better vehicle because it describes what it depends on in a clear fashion which I consider good coding style. One thing for example that I doubt works is to use application info to pass values from the outer of a join to the inner which is a view. A table function can act as a "correlated, parameterized view" in a clean way.

Cheers
Serge

-- 
Serge Rielau
DB2 SQL Compiler Development
IBM Toronto Lab
Received on Thu May 27 2004 - 13:53:19 CDT

Original text of this message

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