Results 1 to 6 of 6
  1. #1
    Join Date
    Oct 2004
    Posts
    54

    Unanswered: SYSTEM is always displayed during schema query

    whenever i perform the

    SELECT DISTINCT OWNER
    FROM ALL_TABLES;

    System and Sys are always displayed,
    is there an SQL Stmt wherein i can filter
    System and Sys without explicitly filtering
    them in the SQL Stmt like where owner <> 'SYSTEM'

    or maybe System and Sys are being displayed because of
    the role of the user...

    i'm quite confused if the role of the user is what needs to be
    checked or my SQL Stmt needs to be modified... please HELP

    thanks in advance.

  2. #2
    Join Date
    Jan 2004
    Location
    Croatia, Europe
    Posts
    4,094
    Provided Answers: 4
    I'm a little bit confused too ... you're querying ALL_TABLES and it seems quite normal that SYS and SYSTEM will also be displayed (unless you restrict fetch using the WHERE clause, just like you've said).
    You could query USER_TABLES instead, but in there you won't find OWNER column (of course; you're the owner).

    Why does existence of SYS and SYSTEM among all the users bothers you, anyway?

  3. #3
    Join Date
    Oct 2004
    Posts
    54
    i actually just want to query all the schema/users except for the
    system and sys, so from you're answer there is no way for me not
    to exclude them aside from the fact that i have to explicity remove
    them from the sql stmt using the where clause.

  4. #4
    Join Date
    Jan 2004
    Location
    Croatia, Europe
    Posts
    4,094
    Provided Answers: 4
    I'd say so. However, someone else might know how to do it the way you'd like it to.

  5. #5
    Join Date
    Jun 2004
    Posts
    796
    Provided Answers: 1
    Looking at this from another angle, what are you doing with the output? One possibility is to spool the output then delete the 'offending' lines from the spooled file.
    90% of users' problems can be resolved by punching them - the other 10% by switching off their PCs.

  6. #6
    Join Date
    Oct 2004
    Posts
    54
    OK, thanks for all the help...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •