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: Query Cache

Re: Query Cache

From: Galen Boyer <galenboyer_at_hotpop.com>
Date: 20 Nov 2002 09:02:31 -0600
Message-ID: <ur8dg9tib.fsf@standardandpoors.com>


On 20 Nov 2002, s.prochazka_at_artaker.com wrote:
> I have an application which is communication via ODBC with an
> Oracle Database. This Application sends queries to the
> Database and processes the result(s). I have no access to the
> source code of this application. Is it possible to tell Oracle
> to modify incoming SQL - Queries and to return the modified
> result? For Example The Application sends: "Select * From x
> where A = 5" This should be modified to "Select * From x where
> A = 6" and the result should be taken from the second query.

Do you have someway to map 5 to 6 for the "a" column?

Put that mapping into a table, call it a_map

    create or replace table a_map (a_mapped number, a number);

Rename your "x" table to "x_t"
(For example purposes, I'm going to assume x is created like)

    create or replace table x_t (id number, a number);

Create a view joining x_t and a_map

    create or replace view x
    as
    select x_t.id, a_map.a_mapped a
    from a_map, x_t
    where a_map.a = x.a
    ;

Now, when the app selects from x, he gets the newly mapped data.

-- 
Galen Boyer
Received on Wed Nov 20 2002 - 09:02:31 CST

Original text of this message

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