Results 1 to 6 of 6

Thread: Describe View

  1. #1
    Join Date
    Nov 2003
    Location
    Utah
    Posts
    4

    Unanswered: Describe View

    From SQL Plus, I would like to see a definition of a view. "Describe" only shows me the fields and datatypes. I need to know what tables the view is pulling from.

  2. #2
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    querying USER_VIEWS will give you the answer you desire

  3. #3
    Join Date
    Nov 2003
    Location
    Utah
    Posts
    4

    Cool Only shows part of it

    That's the right query, but for some reason it only returns part of the view. Here is my query:

    select TEXT from user_views
    where view_name = 'RPVW_PERMIT_SUMMARY';

    and here is the result:

    TEXT
    --------------------------------------------------------------------------------
    select a.pid PERMIT_ID, a.per_type PERMIT_TYPE,
    a.per_num PERMIT_NUMBER, a.PER_E

  4. #4
    Join Date
    Apr 2003
    Location
    Greenville, SC (USA)
    Posts
    1,155
    Here's a script that will generate the sql to create the view ...
    it will prompt you for the view_name and the owner ...

    It will spool out to a file ... at the bottom of this script is the spool
    statement... Change the directory structure to match your
    environment ...

    HTH
    Gregg
    Attached Files Attached Files

  5. #5
    Join Date
    Nov 2003
    Location
    Utah
    Posts
    4

    Thanks for the info

    Useing the first line from gbrabham's script combined with your info, gave me the information I needed:

    set echo off verify off term on feedback off pagesize 0 long 20000

    select text from user_views
    where view_name = 'RPVW_PERMIT_SUMMARY';

    Thanks for your help, I never would have found the 10 tables that are in that view.

  6. #6
    Join Date
    Apr 2003
    Location
    Greenville, SC (USA)
    Posts
    1,155
    Glad it worked out ...

    Gregg

Posting Permissions

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