View dependent on table

hello gurus
i'm running oracle 8.1.7.4. . we can describe a view but I need to know how can we find out on which tables a view is based on and what 's it's definition
Thanks

Hi,
>>I need to know how can we find out on which tables a view is based on
In addition, you can also make use of the *_DEPENDENCIES data dictionary views in order to list informations about direct dependencies and dependency among some schema objects.
e.g:
LEGATTI@ORACLE10> create table t1 (id1 number);
Table created.
LEGATTI@ORACLE10> create table t2 (id2 number);
Table created.
LEGATTI@ORACLE10> create view my_view as select id1,id2 from t1,t2;
View created.
LEGATTI@ORACLE10> select * from user_dependencies where name='MY_VIEW';
NAME        TYPE    REFERENCED_OWNER   REFERENCED_NAME   REFERENCED_TYPE
MY_VIEW     VIEW    LEGATTI            T1                TABLE         
MY_VIEW     VIEW    LEGATTI            T2                TABLE          Cheers
Legatti

Similar Messages

  • Ability to query on all columns from a view with multiple tables

    I have view with 4 tables. view has about 50 columns.
    hypothetically, I want to build a form to give the user an ability to query on any of those 50 columns. user can search on one or more fields.
    what is the best way to write the query to retrieve the results without performance impact.
    please let me know if the question is not clear.

    If you want to permit them to query any of 10 fields with no restrictions, you could create 10 separate single-column indexes. The optimizer would have to try to pick the best of these indexes if you specified multiple search criteria. But since you have a view which presumably means that you've got multiple other indexes involved for the underlying join conditions, you'd probably want/need to combine the column lists of the indexes you're adding for searches with the indexes you've created for joins, which requires looking at the text of the view and figuring out the best way to optimize the 10 single-column searches. Of course, it is possible that the optimizer could chose to do something like a b-tree to bitmap conversion on multiple indexes which could allow it to use multiple independent indexes for your queries, but that's generally not ideal performance-wise.
    All this is a fancy way of saying that there probably isn't a cut and dried answer to your question. You need to figure out the queries you're trying to optimize (say, the 10 single-condition queries) and you need to figure out what set of indexes on the various underlying tables provides the best performance weighing those benefits against the cost on other side of maintenance during DML. Which is going to depend on the text of the view, the underlying tables, the existing indexes, etc.
    Justin

  • View on DB Table

    I want to create a view on DB Table eg CSKS. Can anyone show me how to do this or Show me where I can find information to create view on DB Table.
    Thanks.

    hi anil,
    In database theory, a view is a virtual or logical table composed of the result set of a query. Unlike ordinary tables (base tables) in a relational database, a view is not part of the physical schema: it is a dynamic, virtual table computed or collated from data in the database. Changing the data in a table alters the data shown in the view.
    The result of a view is stored in a permanent table whereas the result of a query is displayed in a temporary table.
    Views can provide advantages over tables;
    They can subset the data contained in a table
    They can join and simplify multiple tables into a single virtual table
    Views can act as aggregated tables, where aggregated data (sum, average etc.) are calculated and presented as part of the data
    Views can hide the complexity of data, for example a view could appear as Sales2000 or Sales2001, transparently partitioning the actual underlying table
    Views take very little space to store; only the definition is stored, not a copy of all the data they present
    Depending on the SQL engine used, views can provide extra security.
    Views can limit the exposure to which a table or tables are exposed to the outer world
    Just like functions (in programming) provide abstraction, views can be used to create abstraction. Also, just like functions, views can be nested, thus one view can aggregate data from other views. Without the use of views it would be much harder to normalise databases above second normal form. Views can make it easier to create lossless join decomposition.
    Rows available through a view are not sorted. A view is a relational table, and the relational model states that a table is a set of rows. Since sets are not sorted - per definition - the rows in a view are not ordered either. Therefore, an ORDER BY clause in the view definition is meaningless and the SQL standard (SQL:2003) does not allow this for the subselect in a CREATE VIEW statement.
    Read-only vs. updatable views
    Views can be read-only or updatable. If the database system is able to determine the reverse mapping from the view schema to the schema of the underlying base tables, then the view is updatable. INSERT, UPDATE, and DELETE operations can be performed on updatable views. Read-only views do not support such operations because the DBMS is not able to map the changes to the underlying base tables.
    Some systems support the definition of INSTEAD OF triggers on views. This technique allows the definition of logic that shall be executed instead of an insert, update, or delete operation on the views. Thus, data modifications on read-only views can be implemented. However, an INSTEAD OF trigger does not change the read-only or updatable property of the view itself.
    Advanced view features
    Various database management systems have extended the views from read-only subsets of data. The Oracle database introduced the concept of materialized views, which are pre-executed, non-virtual views commonly used in data warehousing. They are a static snapshot of the data and may include data from remote sources. The accuracy of a materialized view depends on the frequency or trigger mechanisms behind its updates. DB2 provides so-called materialized query tables (MQTs) for the same purpose. Microsoft SQL Server, introduced in the 2000 version, indexed views which only store a separate index from the table, but not the entire data.
    Equivalency:
    A view is equivalent to its source query. When queries are run against views, the query is modified. For example, if there exists a view named Accounts_view and the content is:
    accounts view:
    SELECT name,
           money_received,
           money_sent,
           (money_received - money_sent) AS balance,
           address,
      FROM table_customers c
      JOIN accounts_table a
        ON a.customerid = c.customer_id
    The application would simply run a simple query such as:
    Sample query
    SELECT name,
           balance
      FROM accounts_view
    The RDBMS then takes the simple query, replaces the equivalent view, then sends the following to the optimiser:
    Preprocessed query:
    SELECT name,
           balance
      FROM (SELECT name,
                   money_received,
                   money_sent,
                   (money_received - money_sent) AS balance,
                   address,
              FROM table_customers c JOIN accounts_table a
                   ON a.customerid = c.customer_id        )
    From this point on the optimizer takes the query, removes unnecessary complexity (i.e. it is not necessary to read the address, since the parent invocation does not make use of it) and then sends the query to the SQL engine for processing.
    thanks
    karthik
    reawrd me if usefull

  • Creation of view on single table?

    Hi Team,
    I have a requirement like for creaation of view on single table (QMEL) in SAP ECC side...
    Note: in this table i need 2o fields only....not all fields.
    First can we create view on single table?
    if  'Yes' can any one tell , How we can creat view on single table?
    While creation of view we have four options..
    1)Data base view
    2)Projection View
    3)Maintanace view
    4)Help view
    in these four options which tyep of view we can choose for creation?
    please can any one suggest me and do the need full..
    i am waiting your responce...

    I quickly skimmed the links provided by others; and in my short discussions with DBA friend of mine; and other sources... partition should be based on user needs, sql server resources, and partition maintenance time.
    Lets say you have 50 regions and 1) partition the data by region, AND 2) place each partition on a different disk, and 3) i am in Texas and only query data in the Texas region then performance will be increased because I am not scanning through the other
    49 regions.
    If you have temporal data (dependent on time - like say financial reports that are sent to the SEC) - the partitions are by time: 1) data from last 13 months is stored on SSD, 2) data 13 months - 3 years old is on HDD, and 3) data >3 years old is stored
    on compressed HDD.  (i say 13 months so you have an entire year and month to date)  --- accountants can get the current data VERY quickly, project managers who need to see a 3 year trend will not have to wait long, and when the SEC calls, who cares?,
    the reports can be queued and generated at night when no one is working. 
    I see partitions are giving the users the least amount of data to query which speeds their results.

  • View in afru table

    i am using a view in afru table and when i m using rso2 and retriving data it is giving a error smeng refers to a differant table . Will u give some clue to ractify this problem

    Since it is a Sap table refered to a differant table i can not change and i need the filed name smeng which is refering to afvv-meinh . In this situation how i will generate view

  • [ADF Help] How to create a view for multiple tables

    Hi,
    I am using Jdeveloper 11G and ADF framework, and trying to create a view to update multiple tables.
    ex:
    Table A has these fields: ID, Name
    Table B has these fields: ID, Address
    A.ID and B.ID are primary keys.
    B.ID has FK relationship with A.ID
    (basically, these tables have one-to-one relation)
    I want to create a view object, which contains these fields: B.ID (or A.ID), A.Name, B.Address.
    So I can execute C,R,U,D for both tables.
    I create these tables in DB, and create entity objects for these tables.
    So there are 2 entity objects and 1 association.
    Then I create a view object based on B and add fields of A into the view:
    If the association is not a "Composition Association",
    when I run the model ("Oracle Business Component Browser") and try to insert new data, fields of A can't edit.
    If the association is a "Composition Association", and click the insert button, I will get
    "oracle.jbo.InvalidOwnerException: JBO-25030: Failed to find or invalidate owning entity"
    If I create a view object based on A and add filed of B into the view:
    When I run the model and try to insert new data, fields of B can't edit, no matter the association is or is not a composition association.
    So... how can I create a view for multiple tables correctly?
    Thanks for any advices!
    Here are some pictures about my problem, if there is any unclear point, please let me know.
    http://leonjava.blogspot.com/2009_10_01_archive.html
    (A is Prod, B is CpuSocket)
    Edited by: user8093176 on Oct 25, 2009 12:29 AM

    Hi Branislav,
    Thanks, but the result is same ....
    In the step 2 of creating view object, I can select entity objects to be added in to the view.
    If I select A first, and then select B (the "Source Usage" of B is A), then finishing the wizards.
    When I try to create a new record in the view, I can't edit any properties of B (those files are disabled).
    If I select B first, and then select A in crating view object, the result is similar ...
    Thanks for any further suggestion.
    Leon

  • Is there a way to view all the table names in a certain schema?

    Is there a way to view all the table names in a certain schema?

    SELECT table_name FROM user_tablesThat won't do much good given this piece of information:
    i am trying to finish a lab for school but i don't know what tables are in my
    professor's schema. The appropriate solution is
    SELECT table_name
    FROM all_tables
    WHERE owner = 'PROFESSOR_YAFFLE'
    /This will show the names of the tables which Prof. Yaffle has granted to us.
    Cheers, APC

  • View, Clustur & Pooled Table

    Hi,
    I have few questions on the above topics.
    How can we retreive data from View , Clustur & Pooled Table using Select statements.
    If possible can you explain me with an example.
    what kind of data can we retreive from them . for example BSEC - how can we use it .
    Thank you in advance.
    Ry

    hi,
    You can access them using SELECT statements,  you CAN NOT use joins though.
    For example, BSEG is a cluster table.
    report znave_0003 .
    data: ibseg type table of bseg with header line.
    parameters: p_bukrs type bseg-bukrs.
    select * into table ibseg from bseg
            up to 100 rows
               where bukrs = p_bukrs.
    loop at ibseg.
      write:/ ibseg-bukrs, ibseg-belnr.
    endloop.
    to retrieve the data from a view....
    Declare the internal table with the type of View.
    Data : itab type table of zview001.
    or write select query as
    select * from zview001 into corresponding fields of itab.
    Also you can uncheck the Unicode checks active (checkbox) in the program attributes.
    {When you check that unicode checkbox, you should use an internal table without a header line. Instead you should declare a work area)
    Hope it helps...
    ~~Guduri

  • View on cluster table

    hi all,
    I am trying to create a view for the tables bkpg and bseg.but am unable to as the error is "bseg is cluster table".
    can't  we create view for cluster table. if can, how

    You cannot create a view because BSEG is in a cluster table
    For this reason SAP has provided some "secondary index" tables, look for :
         BSAD     Accounting: Secondary Index for Customers (Cleared Items)
         BSAK     Accounting: Secondary Index for Vendors (Cleared Items)
         BSAS     Accounting: Secondary Index for G/L Accounts (Cleared Items)
         BSID     Accounting: Secondary Index for Customers
         BSIK     Accounting: Secondary Index for Vendors
         BSIM     Secondary Index, Documents for Material
         BSIS     Accounting: Secondary Index for G/L Accounts
    Regards

  • List view of PDF Table of Contents missing

    In iBooks, PDF files can have two types of Table of Contents, thumbnail view and list view. My problem is some of my PDF files lack the list view of the table of contents.
    I'm under the impression that the list view TOC in iBooks is created from the bookmarks that exist in the PDF file before importing into iBooks. I've been successful in adding new subheadings in the TOC by modifying the bookmarks in the PDF file before installing to iBooks, so I'll be surprised if that's not the case.
    I have two files that have bookmarks in the original PDF file, but when I import into iBooks, there is no option for a list view of the TOC, only the thumbnail view. Can anyone offer any help as to why a PDF file with bookmarks won't show a list view TOC when imported into iBooks?
    While we're at it, when you tap on the TOC button in a PDF file in iBooks, it always takes me to the thumbnails view. I would prefer it default to the list view. Is there any way to do that?
    Thanks.

    There may be more user-friendly ways of doing this, but here's one way:
    Open Terminal (in the Utilities folder).
    Use "cd" to change directory to the folder you want to print
    eg cd /Users/myuser/Documents
    Use "ls" to list the contents to a file
    ls -al > filelist.txt
    You can then open the filelist.txt file from Finder in TextEdit and print it.
    Matt

  • How to create a maintainance view for a table.

    Hi All,
    Can anyone explain me how do we create a maintainance view for a table?
    Also, what access is required to create the view.
    Is it true that for SAP tables we cannot create a maintainance view?
    Appreciate any help on this.

    Hi
    Can anyone explain me how do we create a maintainance view for a table?
    <i>
    You can use the SE11 menu option 'Utilities-->Table Maintenance Generator' or you can use transaction SE54.</i>
    also check
    <i>http://help.sap.com/saphelp_nw04/helpdata/en/38/81c1351181b73fe10000009b38f839/frameset.htm</i>
    http://help.sap.com/saphelp_nw04/helpdata/en/38/81c1351181b73fe10000009b38f839/frameset.htm
    Regards
    krishna
    <i>Note: Award Points if helpful. Thanks</i>

  • Creating a "Print View" of a Table on Another Sheet

    Hi-
    I would like to create a "print view" of a table on another sheet that already has reorganization filters applied to it.  There is a template in Numbers called "Employee Schedule" that has exactly this, where the "printable" table's cells simply reference every cell in the source table on the other sheet.
    I know there is a way to very quickly (i think with a dragging motion), create the references in each cell in one or two operations, as opposed to going to each individual cell and typing in the reference to the source table.  I saw a post about how to do this a while back but cannot seem to locate it again
    How do I do this?  Thanks again for everyones help ;-)
    Thanks
    Matt

    mattford1 wrote:
    Hi-
    Re-reading this, I don't think this answered my question.  I understand how to reference a single cell, but how do you reference an entire table easily without having to go to each cell.
    Thanks
    Matt
    Matt,
    Select the first cell by clicking once on it, such that the border is highlighted. Then grab the little circle in the lower right corner of the border and drag it to the end of your table, either right or down. You can use this method to fill down or to the right. Sometimes it can be fussy, and if it refuses to behave, then you can use the alternate method, Copy and Paste. Click once on the first cell and Command-C. Shift-click the last cell and Command-V.
    Jerry

  • Creation of Database View on different tables

    Hi All,
    I want to create a Data base View on 5 Tables(LIKP,EQUI,MARA,QMFE,QMUR).
    My Question is i will create a View without any selections and the View is based on tables Link (Primary&foreign keys) only.
    Once my View is ready i will pull the data from SAP R/3 based on Infopackage selection.
    Is my approach is correct?or i need to mention any thing while creating the View itself?
    Waiting for reply and your points are assured.
    Regards,
    Madhu Ponnada

    Hi Madhu,
    Table Maintanance Generator are used to view ,modifi tables,Insert table values.
    T-code:-SM30 Maintain tabel views .
    SE54 Generate Table Maintenance Dialog: Initial table/View Screen .
    SE55 Generate Table Maintenance Dialog: generation Environment .
    Steps-to-create-Table Maintanance Generator
    -->Create view in SE11
    -->Goto transcation SE11 ABAP Dictionary
    -->Select View and type in the name of the view you want to create.
    -->Press the Create button
    -->In the dialog box that appears, choose Maintenance View
    -->Select tables and fields for the view
    -->Activate the view
    OR
    -->Create view in SE11
    -->Goto transcation SE11 ABAP Dictionary
    -->enter table name
    -->go to Utilities
    -->select table maintainance Genarator
    -->Enter single step
    --> enter Function Group or same table name (all the code for Table mainaitenace is stored here)
    -->eneter single step
    -->enter Authorization gorup(we can restrict some user,s not tot update data)
    Activate..
    Plz chk the below links.
    http://help.sap.com/saphelp_nw2004s/helpdata/en/a3/5a693c114bf147e10000000a11402f/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/f5/35c83ecedc636be10000000a114084/content.htm
    Reagrds,
    Prabhudas

  • Difference between materailized view and a table

    hey hiii
    i want to know what is a difference between a materialized view and a table i.e suppose i create a table A and another table B on table A i have created a trigger which will upload all the changes made in A ie insert,update or delete so whether this will perform all the action that a materialized view can perform on A or is there any difference between them
    thks

    I'll add to Nicolas' answer that the MV maintenance does have access to mechsnisms other than row-by-row replication of the trigger-based type. Direct path inserts to the base table are very efficiently propagated to the MV, as are partition-based DDL operations. Also MV's come with optional query rewrite built in (you need 10g+ to query rewrite to a non-MV data set), and scheduled refresh so you can defer maintenance of the data set until later.
    MV maintenance can be less efficient though -- you may know something about the data and the way that it changes that allows you to write more efficient meintenance than the MV code.

  • Creating View for a table with parent child relation in table

    I need help creating a view. It is on a base table which is a metadata table.It is usinf parent child relationship. There are four types of objects, Job, Workflow, Dataflow and ABAP dataflow. Job would be the root parent everytime. I have saved all the jobs
    of the project in another table TABLE_JOB with column name JOB_NAME. Query should iteratively start from the job and search all the child nodes and then display all child with the job name. Attached are the images of base table data and expected view data
    and also the excel sheet with data.Picture 1 is the sample data in base table. Picture 2 is data in the view.
    Base Table
    PARENT_OBJ
    PAREBT_OBJ_TYPE
    DESCEN_OBJ
    DESCEN_OBJ_TYPE
    JOB_A
    JOB
    WF_1
    WORKFLOW
    JOB_A
    JOB
    DF_1
    DATAFLOW
    WF_1
    WORKFLOW
    DF_2
    DATAFLOW
    DF_1
    DATAFLOW
    ADF_1
    ADF
    JOB_B
    JOB
    WF_2
    WORKFLOW
    JOB_B
    JOB
    WF_3
    WORKFLOW
    WF_2
    WORKFLOW
    DF_3
    DATAFLOW
    WF_3
    WORKFLOW
    DF_4
    DATAFLOW
    DF_4
    DATAFLOW
    ADF_2
    ADF
    View
    Job_Name
    Flow_Name
    Flow_Type
    Job_A
    WF_1
    WORKFLOW
    Job_A
    DF_1
    DATAFLOW
    Job_A
    DF_2
    DATAFLOW
    Job_A
    ADF_1
    ADF
    Job_B
    WF_2
    WORKFLOW
    Job_B
    WF_3
    WORKFLOW
    Job_B
    DF_3
    DATAFLOW
    Job_B
    DF_4
    DATAFLOW
    Job_B
    ADF_2
    ADF
    I implemented the same in oracle using CONNECT_BY_ROOT and START WITH.
    Regards,
    Megha

    I think what you need is recursive CTE
    Consider your table below
    create table basetable
    (PARENT_OBJ varchar(10),
    PAREBT_OBJ_TYPE varchar(10),
    DESCEN_OBJ varchar(10),DESCEN_OBJ_TYPE varchar(10))
    INSERT basetable(PARENT_OBJ,PAREBT_OBJ_TYPE,DESCEN_OBJ,DESCEN_OBJ_TYPE)
    VALUES('JOB_A','JOB','WF_1','WORKFLOW'),
    ('JOB_A','JOB','DF_1','DATAFLOW'),
    ('WF_1','WORKFLOW','DF_2','DATAFLOW'),
    ('DF_1','DATAFLOW','ADF_1','ADF'),
    ('JOB_B','JOB','WF_2','WORKFLOW'),
    ('JOB_B','JOB','WF_3','WORKFLOW'),
    ('WF_2','WORKFLOW','DF_3','DATAFLOW'),
    ('WF_3','WORKFLOW','DF_4','DATAFLOW'),
    ('DF_4','DATAFLOW','ADF_2','ADF')
    ie first create a UDF like below to get hierarchy recursively
    CREATE FUNCTION GetHierarchy
    @Object varchar(10)
    RETURNS @RESULTS table
    PARENT_OBJ varchar(10),
    DESCEN_OBJ varchar(10),
    DESCEN_OBJ_TYPE varchar(10)
    AS
    BEGIN
    ;With CTE
    AS
    SELECT PARENT_OBJ,DESCEN_OBJ,DESCEN_OBJ_TYPE
    FROM basetable
    WHERE PARENT_OBJ = @Object
    UNION ALL
    SELECT b.PARENT_OBJ,b.DESCEN_OBJ,b.DESCEN_OBJ_TYPE
    FROM CTE c
    JOIN basetable b
    ON b.PARENT_OBJ = c.DESCEN_OBJ
    INSERT @RESULTS
    SELECT @Object,DESCEN_OBJ,DESCEN_OBJ_TYPE
    FROM CTE
    OPTION (MAXRECURSION 0)
    RETURN
    END
    Then you can invoke it as below
    SELECT * FROM dbo.GetHierarchy('JOB_A')
    Now you need to use this for every parent obj (start obj) in view 
    for that create view as below
    CREATE VIEW vw_Table
    AS
    SELECT f.*
    FROM (SELECT DISTINCT PARENT_OBJ FROM basetable r
    WHERE NOT EXISTS (SELECT 1
    FROM basetable WHERE DESCEN_OBJ = r.PARENT_OBJ)
    )b
    CROSS APPLY dbo.GetHierarchy(b.PARENT_OBJ) f
    GO
    This will make sure it will give full hieraracy for each start object
    Now just call view as below and see the output
    SELECT * FROM vw_table
    Output
    PARENT_OBJ DESCEN_OBJ DESCEN_OBJ_TYPE
    JOB_A WF_1 WORKFLOW
    JOB_A DF_1 DATAFLOW
    JOB_A ADF_1 ADF
    JOB_A DF_2 DATAFLOW
    JOB_B WF_2 WORKFLOW
    JOB_B WF_3 WORKFLOW
    JOB_B DF_4 DATAFLOW
    JOB_B ADF_2 ADF
    JOB_B DF_3 DATAFLOW
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

Maybe you are looking for

  • HP Officejet Pro 8600 ( Language change on printer screen )

    I have recently purchased an HP officejet Pro 8600 printer during set up the wrong language was entered by one of my kids & I am unable to read instructions or correct the mistake The printer screen is currently in a foreign language & I am wanting t

  • IPod not syncing with iTunes 7

    Hello, I've been using an Intel iMac with iTunes 7 and a 30GB fifth generation iPod. Everything was working fine until I installed iTunes 7. I've managed to sync all my Music with my Ipod. But if I try to change some of the iPod settings within iTune

  • Camera Raw Update for Photoshop CS3 on Mac 10.5.8

    I've downloaded the camera raw plugin version 4.1 because I'd like to take advantage of the clarity slider, but when I try to open it, photoshop gives me a message that the file type isn't recognized. What am I doing wrong?

  • How to set the value of RichSelectOneChoice

    I have RichSelectOneChoice in a managed bean and I want to set the value of this component. I tried this one but it's using it's index instead of actual value: RichSelectOneChoice comp = (RichSelectOneChoice) agencyListComponent; comp.setValuePassThr

  • Why can't I download from a particular site on my pc but can on my laptop

    when i try to download from Gigasize i am unable to on my pc using firefox or I.E. on my PC but I am able to do it on my laptop any ideas on why and how to fix it please