Query to find out tables using view

Hi
I have a views using three tables.Now i wanted a query to find out number of views using three tables
I have written a query
select * from dba_views where text like '%SELECT%;
It is giving me error as ora error EXPECTED NUMBER GOT LONG.
Appreciate your help?

SELECT DECODE(referenced_type, 'NON-EXISTENT', '.....',
referenced_type) || ' ' || referenced_owner ||
'.' || referenced_name r_name, ' is referenced by: ' ||
type || ' ' || owner || '.' || name name,
' Referenced Link: ' || DECODE(referenced_link_name,
NULL, 'none', referenced_link_name) r_link
FROM dba_dependencies
-- WHERE owner NOT IN ('SYS', 'SYSTEM')
-- and rownum < 50
ORDER BY 1,2;
add your own where clause to it

Similar Messages

  • Generic Extractors with Fm / Finding out tables used

    Hello Gurus,
    for a requirement, i would like to find out the table used in a generic extractor with function module.
    I can see the structure with the objects used but not the tables where they are from.
    How can i find that out?
    Thank you
    Pat

    Hi Gilo ,
    The best way to find out the tables used in the function module will be to analyze the code . Check all your Select Statements in the code and see the tables being used there .
    Sometimes in the code , we use standard function modules from the ECC. Check those standard FMs also and see what table they are using .
    Hope the above reply was helpful.
    Thanks & Regards,
    Ashutosh Singh

  • Find all tables used in a stored procedure

    Hi,
    I have a requirement where i have to find all the tables used in a stored procedures from different  databases.
    Ex: i have a stored procedure where i use few tables from MASTER database and some from STAGE database.When i have written a query to find all tables used in the stored procedure, i am getting only those database table where i run the query and procedure
    exists.
    I have stored procedure SP1 in Master database, but i use the tables from both master and stage.
    When i run this, i am getting the tables only from Master database but not from stage. i hope my requirement is clear.
    I am trying to find all the tables from all databases used by a stored proc.
    ;WITH stored_procedures AS (
    SELECT 
    o.name AS proc_name, oo.name AS table_name,
    ROW_NUMBER() OVER(partition by o.name,oo.name ORDER BY o.name,oo.name) AS row
    FROM sysdepends d 
    INNER JOIN sysobjects o ON o.id=d.id
    INNER JOIN sysobjects oo ON oo.id=d.depid
    WHERE o.xtype = 'P')
    SELECT proc_name, table_name FROM stored_procedures
    WHERE row = 1
    ORDER BY proc_name
    Please advice

    Your question is not entirely clear. You need to run the query on different databases.
    You may find this blog post helpful
    How to get information about all databases without a loop
    Check the last script in that blog post and modify to your particular purpose.
    For every expert, there is an equal and opposite expert. - Becker's Law
    My blog
    My TechNet articles

  • Query to find out the time used by an user for an application

    Hello All,
    I want to know the query to find out the whole time used by the user for an application. Please view the below data
    Employee:
    SNO EMP_ID EMP_NAME EMP_DATE LOGIN_TIME LOGOUT_TIME
    1 10 Visu 21-Nov-2010 06:30:00 07:30:00
    2 10 Visu 21-Nov-2010 06:40:00 07:20:00
    3 10 Visu 21-Nov-2010 06:50:00 07:50:00
    4 10 Visu 21-Nov-2010 07:30:00 08:30:00
    5 10 Visu 21-Nov-2010 09:30:00 10:30:00
    By checking the above data we can say that the total time Visu used the application is
    8.30 - 6.30 (From 1,2,3,4 records) = 2hrs
    10.30 - 9.30 (Based on 5th rec) = 1hr
    So the total time Visu used the application would be 3 hrs = 180 mins.
    Could you please help me in getting the result from that data using a query?

    odie_63 wrote:
    I think it may be solved with analytics too.
    with t1 as (
                select 1 sno,10 emp_id,'Visu' emp_name,'21-Nov-2010' emp_date,'06:30:00' login_time,'07:30:00' logout_time from dual union all
                select 2,10,'Visu','21-Nov-2010','06:40:00','07:20:00' from dual union all
                select 3,10,'Visu','21-Nov-2010','06:50:00','07:50:00' from dual union all
                select 4,10,'Visu','21-Nov-2010','07:30:00','08:30:00' from dual union all
                select 5,10,'Visu','21-Nov-2010','09:30:00','10:30:00' from dual
         t2 as (
                select  emp_id,
                        emp_name,
                        emp_date,
                        to_date(emp_date || login_time,'DD-MON-YYYYHH24:MI:SS') login_time,
                        to_date(emp_date || logout_time,'DD-MON-YYYYHH24:MI:SS') logout_time
                  from  t1
         t3 as (
                select  t2.*,
                        case
                          when login_time < max(logout_time) over(
                                                                  partition by emp_id,emp_date
                                                                  order by login_time
                                                                  rows between unbounded preceding
                                                                           and 1 preceding
                            then 0
                          else 1
                        end start_of_group
                  from  t2
         t4 as (
                select  t3.*,
                        sum(start_of_group) over(partition by emp_id,emp_date order by login_time) grp
                  from  t3
         t5 as (
                select  emp_id,
                        emp_date,
                        min(login_time) login_time,
                        max(logout_time) logout_time
                  from  t4
                  group by emp_id,
                           emp_date,
                           grp
    select  emp_id,
            numtodsinterval(sum(logout_time - login_time),'day') time_spent
      from  t5
      group by emp_id
      order by emp_id
        EMP_ID TIME_SPENT
            10 +000000000 03:00:00.000000000
    SQL> SY.

  • How to use ONE query to find out tree structure?

    ID------------upperID----------Name------------------------isFolder
    1------------ 0---------- Folder
    1------------------------------------1
    2------------ 1------------ Folder 1- Sub
    Folder--------------------1
    3------------ 2------------
    Folder1-Item1-A--------------------------0
    4------------ 1------------ Folder 1- Sub
    Item-----------------------0
    Hi all, if I have a table like above to demonstrate the
    folders and item relationship. This structure allows the user to
    create unlimited folders and items.
    Now I would like to use one query to find out the tree
    structure of this table, how could I do the query.
    Any help on this will be highly appreciated!
    Thanks,
    ez

    Also, see this thread:
    http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?forumid=1&catid=7&threadid=12 55788&enterthread=y

  • Query to find out controls displayed as in UI for an applet,along with view

    Hi,
    I am looking for a query to find out list of all the controls as displayed in UI applet along with applet's view.
    Please note that in the query only mapped controls (those displayed in UI ) should come up.
    Regards,
    Kunal

    Hi,
    If the EUL is an apps mode (EBS) EUL then the eu_username column is the apps user id or apps resp id. If you want to show only the responsibilities and convert those ids to names then you need to use the EUL5_GET_APPS_USERRESP function like this:
    select ba_name, ba_developer_key, EUL5_GET_APPS_USERRESP(eu.eu_username, 'R') responsibility_name
    from eul5_bas ba
       , eul5_access_privs ap
       , eul5_eul_users eu
    where ba.ba_id = ap.gba_ba_id
    and ap.ap_type = 'GBA'
    and ap.ap_eu_id = eu.eu_id
    and eu.eu_role_flag=1
    order by 1,2,3Rod West

  • Query to find out whether a table is sub-partitoned , composite type one

    Could you please let me know the query to find out whether a paritioned table
    is
    1). composite paritioned one.
    2). sub-paritioned one.
    I find that there are 2 cols in all_tab_partitions view, which lets me know
    1). COMPOSITE VARCHAR2(3)
    To find composite paritioned one or not.
    2). SUBPARTITION_COUNT NUMBER
    To find whether a table is sub-paritioned one or not.
    Any light on the above topic is highly appreciated.

    So it seems you've found the answer yourself?
    with »user_tab_partitions« and »user_tab_subpartitons« you'll get all the neccessary information you are looking for.

  • Query to find out the Activities done against a table

    Hi,
    One table has been truncated and data reloaded into the table by the user. But at latter stage user deny that activity. I believe all these activities stored in any oracle 10g database table.
    Need a query to find out the activities done on a specific date say 6th Sep.
    This is too urgent. Thanks in advance

    Hi,
    Welcome to the forum!
    If you don't have enable table auditing maybe you can see last_ddl_time column of user_objects view:
    Connected to Oracle Database 10g Express Edition Release 10.2.0.1.0
    Connected as hr
    SQL> select * from test2;
          COL1       COL2       COL3
             1          1          3
             1          2          3
             1          3          3
    SQL> select to_char(uo.created, 'DD/MM/YYYY HH24:MI:SS'), to_char(uo.last_ddl_time, 'DD/MM/YYYY HH24:MI:SS') from user_objects uo where uo.object_name = 'TEST2';
    TO_CHAR(UO.CREATED,'DD/MM/YYYY TO_CHAR(UO.LAST_DDL_TIME,'DD/M
    12/09/2009 12:20:26            12/09/2009 12:20:27
    SQL> truncate table test2;
    Table truncated
    SQL> select to_char(uo.created, 'DD/MM/YYYY HH24:MI:SS'), to_char(uo.last_ddl_time, 'DD/MM/YYYY HH24:MI:SS') from user_objects uo where uo.object_name = 'TEST2';
    TO_CHAR(UO.CREATED,'DD/MM/YYYY TO_CHAR(UO.LAST_DDL_TIME,'DD/M
    12/09/2009 12:20:26            12/09/2009 14:01:21
    SQL> Regards,

  • Please give the query to find out primary key in table in Sql plus

    Dear friends,
    Please give me the query to find out the primary key in Sql plus.

    hi
    SQL> DESC user_constraints
    Name                                                                                                  
    OWNER                                                                                                 
    CONSTRAINT_NAME                                                                                       
    CONSTRAINT_TYPE                                                                                       
    TABLE_NAME                                                                                            
    SEARCH_CONDITION                                                                                      
    R_OWNER                                                                                               
    R_CONSTRAINT_NAME                                                                                     
    DELETE_RULE                                                                                           
    STATUS                                                                                                
    DEFERRABLE                                                                                            
    DEFERRED                                                                                              
    VALIDATED                                                                                             
    GENERATED                                                                                             
    BAD                                                                                                   
    RELY                                                                                                  
    LAST_CHANGE                                                                                           
    INDEX_OWNER                                                                                           
    INDEX_NAME                                                                                            
    INVALID                                                                                               
    VIEW_RELATED                                                                                          
    SQL> SELECT constraint_name,table_name,r_constraint_name,status
      2  FROM user_constraints WHERE constraint_type='P';
    CONSTRAINT_NAME                TABLE_NAME                     R_CONSTRAINT_NAME              STATUS
    SYS_C003141                    CUSTOMERS                                                     ENABLED
    PK_DEPT                        DEPT                                                          ENABLED
    SYS_C003139                    SALESREPS                                                     ENABLEDKhurram

  • Query to find out the list of user who have delete access

    Hi,
    I need a query to find out the list of users who have delete access on perticular folder/universe/ reports  in infoview.
    Please advice.
    Regards,
    Neo.

    orton607 wrote:
    thanks for replying guys. But the thing is i am using dynamic sql execute immediate in my package, so i want those tables also and the schema name.
    thanks,
    ortonThis is not possible. The best you could do is to have a good guess.
    Or how would you parse some dynamic statement as this:
       v_suffix := 'loyees';
       v_sql := 'Select count(*) from (select ''nonsense'' col1 from emp'||v_suffix||') where col1 = ''Y'''';
       execute_immediate(v_sql);
    ...What is the table name? How do you want to parse that?
    Better rewrite all dynamic SQL statements into non dynamic ones. Or do the source control logic for those dynamic parts in an extra module. For example implement your own dependency table and force every developer to add there all dynamic parts.

  • Writing a query to find out who is having a given responsibility name.

    Hi,
    I am new to Oracle Apps and have no idea about its tables. Can anyone please help me in writing a query to find out who is having a given responsibility name.
    Thanks in advance.
    Regards
    Himanshu

    Hi
    you can get required data by using this query
    select usr.user_name
    ,     res.responsibility_name
    from fnd_user usr
    ,     FND_USER_RESP_GROUPS_DIRECT usrrep
    ,     fnd_responsibility_tl res
    where usr.user_id=usrrep.user_id
    and usrrep.responsibility_id=res.RESPONSIBILITY_ID
    group by usr.user_name,res.responsibility_name
    Regards,
    Venky

  • How to find out the used space and free space in the DB for attachments

    Hi,
    In CRM 5.2 web UI, we can save a transaction by saving attachments like work documents or text files.
    Could someone help me find out the used space, free space, maximum capacity on the CRM DB for these attachments.
    Thanks & Best Regards,
    Ramesh.

    Hi,
    check with  below table
    TNAPR   ---  Processing programs for output
    and NACE Transaction code
    NACE  --  out types
    Regards,
    Madhu

  • How to find out table name for the field in the webUI

    Hi.
    I am in CRM2007.
    So i go to the transaction code    BSP_WD_CMPWB
    In that i provide the component name as CRM_UI_FRAME.
    I press the Test button.
    So, it opend the WebUI.
    I want how to find out table of the particular input field?
    I mean from which table the data is retrived how to find out?
    When i enter some thing in the input field how to find out in which table that data is stored?
    By pressing F2 on the input field it opend View and Component Name.
    I want find out table of that particular field. How to find it?
    If anybody know about this explain it with Screen shorts if possible.
    Thank You.
    Krishna. B.

    hi
    goto tx genil_model_browser. Suppose you want to find fields reated to your order header eg sold to name. In component set write all and press F8. Then goto access object and in access object click on node BTAdminH. Click on attribute structure. Here you will find structure and attributes. If you click relationship then you will see all the relationship wrt btadminh. open any r/s that you require. and click on other object and attribute. You will get to know the structure.
    Best regards
    Pankaj kumar

  • Query to find out which process consuming more cpu?

    Hi All,
    some one please tell me the query to find out which process is consuming more
    cpu resources?
    Thanks and Regards
    Srikanth

    Use V$SESSTAT to determine which sessions are using most CPU, and investigate what SQL these users/sessions are executing:
    SQL> select ss.sid, se.command, ss.value CPU, se.username, se.program
    from v$sesstat ss, v$session se
    where ss.statistic# in
    (select statistic#
    from v$statname
    where name = 'CPU used by this session')
    and se.sid=ss.sid
    order by ss.value desc;

  • Query to find out license products installed

    hai dba
    tell me the query to find out what r hte products installed r licensed??
    regards
    dba

    1) From OAM: Oracle Applications Manager > Site Map > License Manager > Reports > License Products/Shared Products
    2) Use $AD_TOP/sql/adutconf.sql
    3) Use the following query:
    SQL> select fa.APPLICATION_SHORT_NAME, fpi.PATCH_LEVEL, DECODE(fpi.STATUS, 'I','Installed',
    'S','Shared', 'N', 'Inactive', fpi.STATUS) Status , fpi.DB_STATUS
    from fnd_product_installations fpi,FND_APPLICATION fa
    where fpi.APPLICATION_ID in (
    select APPLICATION_ID from FND_APPLICATION)
    and fa.APPLICATION_ID=fpi.APPLICATION_ID;

Maybe you are looking for

  • Additional Data in Header Level for ME51N / ME52N / ME53N

    Dear Gurus, I have one requirement related to apply enhancement for additional fields in purchase requisition header level. After searching a lot , I dint found any solution for this. Does anybody have any solution for this. Regards, Shibashis.

  • Error 1600 when trying to restore.

    I turned my iPod touch on this morning, listened to so music, then shut it off. About 2 hours later I go to turn it on and it just stays on a black screen, doesn't light up at all. I plug it into my PC thinking maybe it just needs to update or someth

  • Time Capsule, I lost it after connecting. Where do I find it??

    I tried to connect my TC today. I somehow have messed up, because my Airport-settings have been changed, and suddenly (after that) the TC can not connect to my iMac.(I have an unsecured wireless connection, and it came a message that it should be sec

  • AcroTray?? acrobat 9 pro problem

    Hi there! Maybe there is a post from earlier but here is a new one. I have adobe acrobat 9 pro and needed to test the 11 and so I did. After a month the test where finished and I uninstalled. After the uninstall of adobe acrobat 11 the 9 pro wouldent

  • How do you call the same parameters from function to function

    I need to create several functions to try and consolidate and clear up readability in my program and I need to call the same things in all the functions. How do I do that without writing everything I need to call in each function?