Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: Parameterized Views
Mir,
Is this what you are looking?
create or replace view my_view as
select loginid, delegate_userid, orgid
from table1
union
select loginid, delegate_userid, orgid
from table2
union
select loginid, delegate_userid, orgid
from table3;
select delegate_userid, orgid from my_view
where loginid = 'SOMEUSER'
Regards
Mindaugas
Oracle&DB2 DBA
----- Original Message ----
From: Mir M. Mirhashimali <mhyder_at_rice.edu>
To: Alvaro Jose Fernandez <alvaro.fernandez_at_sivsa.com>
Cc: oracle-l_at_freelists.org
Sent: Wednesday, September 19, 2007 1:37:32 PM
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
-- http://www.freelists.org/webpage/oracle-lReceived on Wed Sep 19 2007 - 13:44:59 CDT