DBAsupport.com Forums - Powered by vBulletin
Results 1 to 4 of 4

Thread: What table will show what view columns with table columns?

  1. #1
    Join Date
    Apr 2001
    Location
    Congleton
    Posts
    258

    What table will show what view columns with table columns?

    I have a very complexed view that retrieves information from several tables, and I need to know what table columns these view columns are referencing, for example:
    create sds_test (sds_num number, sds_data varchar2(50);
    create sds_view (test_num,test_data) as (select sds_num,sds_data from sds_test);

    How can I find out what table column test_num on the view sds_view is referencing, i.e. result would be sds_num on the table sds_test.

    Thanks. Regards, Sheryl

  2. #2
    Join Date
    Mar 2007
    Location
    Ft. Lauderdale, FL
    Posts
    3,555
    Extract view DDL - everything is there.
    Pablo (Paul) Berzukov

    Author of Understanding Database Administration available at amazon and other bookstores.

    Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.

  3. #3
    Join Date
    Apr 2001
    Location
    Congleton
    Posts
    258
    Hi Paul, Thanks for the info, but this particular view is very complexed. It has over 184 columns, retrieving data from 6 different tables, using decodes etc. So searching through the extracted DDL for the column would be very time consuming and difficult. Is there an easier way?
    Thanks.
    Rgds. Sheryl

  4. #4
    Join Date
    Jul 2006
    Posts
    195
    Quote Originally Posted by ssmith View Post
    Hi Paul, Thanks for the info, but this particular view is very complexed. It has over 184 columns, retrieving data from 6 different tables, using decodes etc. So searching through the extracted DDL for the column would be very time consuming and difficult. Is there an easier way?
    Thanks.
    Rgds. Sheryl
    Have you tried using exp and imp?

    exp userid=/ owner=some_schema
    imp userid=/ indexfile=foo.sql


    that'll get you the ddl than all you have to do is look for REM or remove them
    if you want to be able to re-process the statement.

Posting Permissions

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


Click Here to Expand Forum to Full Width