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@xxxxxxxx>
To: Alvaro Jose Fernandez <alvaro.fernandez@xxxxxxxxx>
Cc: oracle-l@xxxxxxxxxxxxx
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

Other related posts: