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: Parameterized Views

RE: Parameterized Views

From: Bobak, Mark <Mark.Bobak_at_il.proquest.com>
Date: Wed, 19 Sep 2007 14:39:40 -0400
Message-ID: <AA29A27627F842409E1D18FB19CDCF270D697258@AABO-EXCHANGE02.bos.il.pqe>


If you simply write:
Create view my_view as
Select delegate_userid, orgid from table1 union
Select delegate_userid, orgid from table2 Union
Select delegate_userid, orgid from table3;

And then do:
Select * from my_view where loginid='SOMEUSER';

Predicates should be pushed down, and you should get the behavior you desire.

-Mark

--
Mark J. Bobak
Senior Database Administrator, System & Product Technologies
ProQuest
789 E. Eisenhower, Parkway, P.O. Box 1346
Ann Arbor MI 48106-1346
+1.734.997.4059  or +1.800.521.0600 x 4059
mark.bobak_at_il.proquest.com
www.proquest.com
www.csa.com

ProQuest...Start here. 


-----Original Message-----
From: oracle-l-bounce_at_freelists.org [mailto:oracle-l-bounce_at_freelists.org] On Behalf Of Mir M. Mirhashimali
Sent: Wednesday, September 19, 2007 1:38 PM
To: Alvaro Jose Fernandez
Cc: oracle-l_at_freelists.org
Subject: Re: Parameterized Views

Hi Alvaro,

I mean i have a SQL statement something like this

select delegate_userid, orgid
  from table1
 where loginid = 'SOMEUSER'
union
select delegate_userid, orgid
  from table2
 where loginid = 'SOMEUSER'
union
select delegate_userid, orgid
  from table3
 where loginid = 'SOMEUSER'

I want to create the above sql as a view and want to pass the 'SOMEUSER' 
as a parameter to the view.

Thanks

-- 
Mir M. Mirhashimali
Oracle Systems Manager
Database Architecture, Enterprise Applications
Rice University
(713) 348 6365



Alvaro Jose Fernandez wrote:

> Hello Mir,
>
> I don't understand exactly the meaning of a parametrized view. Could you elaborate more on this?
>
> regards
> alvaro
>
> -----Mensaje original-----
> De: oracle-l-bounce_at_freelists.org [mailto:oracle-l-bounce_at_freelists.org] En nombre de Mir M. Mirhashimali
> Enviado el: miércoles, 19 de septiembre de 2007 18:47
> Para: oracle-l_at_freelists.org
> Asunto: Parameterized Views
>
> I was wondering if it is possible to parameterizes a view. did some
> googling but did not find any satisfactory results.
>
>
-- http://www.freelists.org/webpage/oracle-l -- http://www.freelists.org/webpage/oracle-l
Received on Wed Sep 19 2007 - 13:39:40 CDT

Original text of this message

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