Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> selective use of UNION - is there a way?

selective use of UNION - is there a way?

From: Jeff Guttadauro <jeff109_at_NOSPAM.netscape.net>
Date: Wed, 25 Aug 1999 17:30:06 GMT
Message-ID: <37c4247e.13120306@news>


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

Original text of this message

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