Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> selective use of UNION - is there a way?
Hello, all.
I have a view set up in the following way:
Create or replace view logon_view as
select 'SCHEMA1' schema_name, logon_id logon_id
from SCHEMA1.logon_table
union
select 'SCHEMA2' schema_name, logon_id logon_id
from SCHEMA2.logon_table
This view is used to determine if a given user has been set up with permission to access the data in a particular schema when he logs into our application. This works fine, but if the logon_table is dropped from one of the schemas, the view becomes invalid and log-ins to any schema are disabled until it's recreated.
My question is: Is there any way to define the view so that it won't mind if the logon_table in one of the schemas does not exist? Is there some way to only UNION if the table exists that you know of or will I have to revamp our security checking?
Any help is greatly appreciated!
-Jeff Guttadauro
Received on Wed Aug 25 1999 - 12:30:06 CDT
![]() |
![]() |