Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> (HELP !!! ) NEED TO WRITE A SCRIPT SHOWING ONLY EXCEPTIONS
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
![]() |
![]() |