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: Boyle, Christopher <Christopher.Boyle_at_MultiPlan.com>
Date: Wed, 19 Sep 2007 14:17:58 -0400
Message-ID: <FB9C2CA54863FE4B9AD2F02613018F721E46BD@nyc-exch-01.multiplan.com>


Create table myParam (someuser varchar2(50);

Create view v_bob as
select delegate_userid, orgid
  from table1, myParam
 where loginid = SOMEUSER
union
select delegate_userid, orgid
  from table2, myParam
 where loginid = SOMEUSER
union
select delegate_userid, orgid
  from table3, myParam
 where loginid = SOMEUSER

insert into myParam values('YourName')

select * from v_bob;

might be one approach to explore

-----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 ______________________________________________________________________ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email ______________________________________________________________________ NOTICE OF CONFIDENTIALITY: Information included in and/or attached to this electronic mail transmission may be confidential. This electronic mail transmission is intended for the addressee(s) only. Any unauthorized disclosure, reproduction, or distribution of, and/or any unauthorized action taken in reliance on the information in this electronic mail is prohibited. If you believe that you have received this electronic mail transmission in error, please notify the sender by reply transmission, or contact helpdesk_at_multiplan.com, and delete the message without copying or disclosing it. ______________________________________________________________________ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email ______________________________________________________________________ -- http://www.freelists.org/webpage/oracle-l
Received on Wed Sep 19 2007 - 13:17:58 CDT

Original text of this message

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