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 -> (HELP !!! ) NEED TO WRITE A SCRIPT SHOWING ONLY EXCEPTIONS

(HELP !!! ) NEED TO WRITE A SCRIPT SHOWING ONLY EXCEPTIONS

From: stiffness <vze2t7nz_at_verizon.net>
Date: Sat, 02 Jun 2007 22:41:03 GMT
Message-ID: <3mm8i.532$jW6.20@trnddc01>


Hello,

I am querying the data dictionary for anyone with a improperly defined default tablespace. The default table space for DBA_USER should be either USERS or DATA*. I need my script to SHOW ONLY THE EXCEPTIONS meaning those individuals who have improperly defined table spaces that are not by either of the above. HERE IS WHAT I HAVE ATTEMPTED.

Attempt 1.

SQL> select username, default_tablespace, created   2 FROM dba_users
  3 WHERE default_tablespace<>'USERS''DATA';

The above script worked BUT in the reverse showing users in USERS AND DATA default_tablespace.

Attempt 2.

SQL> select username, default_tablespace, created   2 FROM dba_users
  3 WHERE NOT default_tablespace='USERS'   4 OR NOT default_tablespace='DATA';

The above script also worked but in the reverse. HELP !!! Received on Sat Jun 02 2007 - 17:41:03 CDT

Original text of this message

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