To Get all the Table Names

Hi All
I have nearly 70 procedures in my database.
I want to get all the distinct table names used in the 70 procedures.
Is it possible?
Note:
All the table names are prefixed by schema name like DEVSRC.table_name.
Please advice
Thanks
Jo

Johney  wrote:
Hi VT
One doubt.
This query will give the table names of only select stmt used in the procedure
or
List of table names that are with in any DML operations inside the procedure?
Thanks
JoIt will give all the table either used in select or in any DML..
You can also check by creating a temp proc
SQL> drop procedure proc_test;
Procedure dropped.
SQL> select name, referenced_name, dependency_type from user_dependencies
  2  where type = 'PROCEDURE' and referenced_type = 'TABLE' and name='PROC_TEST';
no rows selected
SQL> create or replace
  2  PROCEDURE proc_test
  3  IS
  4  v_ID    number;
  5  v_PRID  number;
  6  v_PRLID number;
  7  v_DATERECEIVED date;
  8  Cursor C1 is
  9  select * from table_c;
10   BEGIN
11   open c1;
12     LOOP
13      FETCH c1 INTO v_ID,v_PRID,v_PRLID,v_DATERECEIVED;
14      EXIT WHEN c1%NOTFOUND;
15      insert into table_b values(v_ID,v_PRID,v_PRLID,v_DATERECEIVED);
16      Commit;
17     END LOOP;
18   CLOSE C1;
19   END;
20  /
Procedure created.
SQL> select name, referenced_name, dependency_type from user_dependencies
  2  where type = 'PROCEDURE' and referenced_type = 'TABLE' and name='PROC_TEST';
NAME
REFERENCED_NAME                                                  DEPE
PROC_TEST
TABLE_B                                                          HARD
PROC_TEST
TABLE_C                                                          HARD
SQL> Regards
Umesh

Similar Messages

  • I want to get all the user name form LOGIN table ... how help me ?

    hi all
    I have table in MS Access databse called Login with two coulmn (User, Password),
    I want to get all the User Name in a string[] called USER,
    (LIKE USER = {"AA","BB","CC",........"zz"};)
    can anybody send me the code to get the USERNAMES form Login Table, i tried lots of way but bad luck
    so plz someone send me a code.
    Thanx
    Regards
    Satinder

    I made something like this as He pasted the the code above and u know this works for me atleast thanx
    kind regards
    satinderjit
    String User[] = new String[1000];
    try
    //Load Driver
    Class.forName(driver);
    // Make Connection
    connection=DriverManager.getConnection(url,user,password);
    // Create Statement
    statement = connection.createStatement();
    sql = "SELECT User FROM Login" ;
    // Create Resultset
    rs = statement.executeQuery(sql);
    int j=0;
    while(rs.next())
    User[j]= rs.getString("User");
    j=j+1;
    for(int i=0 ;i<J;i++)
    Form.C_Manager.addItem(User);
    statement.close();
    //rs.close();
    connection.close();
    catch(ClassNotFoundException cnfex) {
    //show message
    JOptionPane.showMessageDialog((Component) null,
    "Failed to load driver..."+
    "\n"+cnfex.getMessage(),
    "Error...",
    JOptionPane.ERROR_MESSAGE);
    catch(SQLException sqlex){
    //show message
    JOptionPane.showMessageDialog((Component) null,
    "Unable to connect to Database..."+
    "\n"+sqlex.getMessage(),
    "Error...",
    JOptionPane.ERROR_MESSAGE);
    catch(ArrayIndexOutOfBoundsException e){
    //show message
    JOptionPane.showMessageDialog((Component) null,
    "Unable to Load User Name..."+
    "\n"+e.getMessage(),
    "Error...",
    JOptionPane.ERROR_MESSAGE);

  • I want to get all the User Name in a string[ ], but How..... don't know

    hi all
    I have table in MS Access databse called Login with two coulmn (User, Password),
    I want to get all the User Name in a string[] called USER,
    (LIKE USER = {"AA","BB","CC",........"zz"};)
    can anybody send me the code to get the USERNAMES form Login Table, i tried lots of way but bad luck
    so plz someone send me a code.
    Thanx
    Regards
    Satinder

    Well, the biggest problem is that you don't know (probably) a head of time how many names are in the table.
    So i'd first stuff them into a managed array such as ArrayList
    So you'd
    (1) Iterate over the resultset
    (1.1) for each row call getString() on the user field
    (1.1) call add on the ArrayList to add the string
    (2) Call toArray on the ArrayList to convert it to a plain array
    (NOTE: you will have to pass a String[] {""} arg as a parm to
    toArray() to get the right type of array.)

  • 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

  • Select data from all the table names in the view

    Hi,
    "I have some tables with names T_SRI_MMYYYY in my database.
    I created a view ,Say "Summary_View" for all the table names
    with "T_SRI_%".
    Now i want to select data from all the tables in the view
    Summary_View.
    How can i do that ? Please throw some light on the same?
    Thanks and Regards
    Srinivas Chebolu

    Srinivas,
    There are a couple of things that I am unsure of here.
    Firstly, does your view definition say something like ...
    Select ...
    From "T_SRI_%"
    If so, it is not valid. Oracle won't allow this.
    The second thing is that your naming convention for the
    tables suggests to me that each table is the same except
    that they store data for different time periods. This would be
    a very bad design methodology. You should have a single
    table with an extra column to state what period is referred to,
    although you can partition it into segments for each period if
    appropriate.
    Apologies if i am misinterpreting your question, but perhaps
    you could post your view definition and table definitions
    here.

  • Function to get all the months name of a year from dual

    HI GURUS
    Is there any function to get all the months name of a year from dual
    thanks in advance

    What about this --
    satyaki>
    satyaki>select months_name
      2  from (
      3         select to_char(add_months(trunc(sysdate,'YEAR'),rownum-1),'MONTH') months_name
      4         from dual
      5         connect by rownum<=12
      6       );
    MONTHS_NAME
    JANUARY
    FEBRUARY
    MARCH
    APRIL
    MAY
    JUNE
    JULY
    AUGUST
    SEPTEMBER
    OCTOBER
    NOVEMBER
    MONTHS_NAME
    DECEMBER
    12 rows selected.
    satyaki>Regards.
    Satyaki De.

  • Problem while displaying all the table names from a MS Access Data Source.

    I started preparing a small Database application. I want to display all the Table Names which are in the 'MS Access' Data Source.
    I started to executing by "Select * from Tab" as if in SQL.
    But i got an error saying that "Not able to resolve Symbol 'Tab' in the query".
    Please let me know how can i display all the table Names in the MS Access Dats Source.

    Here i am developing the application in Swing using JDBC for accessing the database.
    I want to display all the Table names from the data source in a ListBox for easy selection of tables to view their details.

  • Script to get all the Server Names on Central Site in the SCCM 2007 Hierarchy

    I want a script which will run on Central Site, and give all the SCCM server names in the hierarchy.
    Thanks and Regards, Mohd Zaid www.techforcast.com

    Duplicated post of
    http://social.technet.microsoft.com/Forums/systemcenter/en-US/97910cd5-8f8b-46a7-86fa-c00932571d0d/script-to-get-all-the-server-names-on-central-site-in-the-sccm-2007-heirarchy?forum=configmgrgeneral
    Garth Jones | My blogs: Enhansoft and
    Old Blog site | Twitter:
    @GarthMJ

  • [CS3 JS]Get all the tables in the document

    Hello All,
    I want to return all of the tables in the document, including those in table cells. I am using this:
    var aTables = app.activeDocument.stories.everyItem().tables.everyItem().getElements();
    but it doesn't get tables inside of tables. Is there an easy way to do this without checking each table cell? Thanks in advance.
    Rick Quatro
    585-659-8267

    Hi Robin and Dave,
    Thanks for your replies. This seems to work fine regardless of the nexting level.
    Rick
    var oDocTables = app.activeDocument.stories.everyItem().tables.everyItem().getElements();
    if (oDocTables.length)
      oDocTables = GetAllTables(oDocTables);
    alert(oDocTables.length);
    function GetAllTables(oTables)
      for(var i=0; i < oTables.length; i++)
        var oCells = oTables[i].cells;
        for (var j=0; j < oCells.length; j++)
          var oCellTables = oCells[j].tables.everyItem().getElements();
          if (oCellTables.length)
            oTables = oTables.concat(oCellTables);
      return oTables;

  • How to get all the measure names in a cube

    Hello,
    How can I get the list of all measures in a SSAS database or cube by MDX / XMLA.
    If I get the details like what are all aggregations used and under which folder the measures available that will be great.
    We can get the same by SQL and i would like to get the same from a cube.
    SQL:
    select column_name from information_schema.columns
     where table_name = 'MyTable'
    order by ordinal_position
    Regards,
    Palash

    Hi Palash
    Please see the belwo DMV (Dynamic Management View) which will get the same by SQL.
    All Cubes in database 
    SELECT [CATALOG_NAME] AS [DATABASE],CUBE_CAPTION AS [CUBE/PERSPECTIVE],BASE_CUBE_NAME FROM $system.MDSchema_Cubes WHERE CUBE_SOURCE=1
    All dimensions in Cube 
    SELECT [CATALOG_NAME] as [DATABASE], CUBE_NAME AS [CUBE],DIMENSION_CAPTION AS [DIMENSION]  FROM $system.MDSchema_Dimensions 
    WHERE CUBE_NAME  ='Adventure Works' AND DIMENSION_CAPTION  'Measures'
    --All Attributes 
    SELECT [CATALOG_NAME] as [DATABASE],  CUBE_NAME AS [CUBE],[DIMENSION_UNIQUE_NAME] AS [DIMENSION],  HIERARCHY_DISPLAY_FOLDER AS [FOLDER],HIERARCHY_CAPTION AS [DIMENSION ATTRIBUTE],  HIERARCHY_IS_VISIBLE AS [VISIBLE]  FROM $system.MDSchema_hierarchies 
    WHERE CUBE_NAME  ='Adventure Works' AND HIERARCHY_ORIGIN=2 
    All Hierarchies (user-defined) 
    SELECT [CATALOG_NAME] as [DATABASE],  CUBE_NAME AS [CUBE],[DIMENSION_UNIQUE_NAME] AS [DIMENSION],  HIERARCHY_DISPLAY_FOLDER AS [FOLDER],HIERARCHY_CAPTION AS [HIERARCHY],  HIERARCHY_IS_VISIBLE AS [VISIBLE] 
    FROM $system.MDSchema_hierarchies 
    WHERE CUBE_NAME  ='Adventure Works' and HIERARCHY_ORIGIN=1 
    All Measures 
    SELECT [CATALOG_NAME] as [DATABASE],  CUBE_NAME AS [CUBE],[MEASUREGROUP_NAME] AS [FOLDER],[MEASURE_CAPTION] AS [MEASURE],[MEASURE_IS_VISIBLE] 
    FROM $SYSTEM.MDSCHEMA_MEASURES 
    WHERE CUBE_NAME  ='Adventure Works'
    SUHAS http://suhaskudekar.blogspot.com/ Please click "Mark as Answer" if this resolves your problem or "Vote as Helpful" if you find it helpful.

  • How to get all the Model name and Entity name through programmatically

    I am using this code to get Model name
    clientProxy = GetClientProxy(mdsURL);
    ModelMembersGetRequest request = new ModelMembersGetRequest();
    ModelMembersGetResponse response = new ModelMembersGetResponse();
    response=clientProxy.ModelMembersGet(request);
    Model member count i am getting zero
    Error count is 1(required parameter is missing)
    please help me to resolve the issue

    The model/entity/attribute name can be retrieved by MetadataGet.
    You can found some sample code here:
    http://sqlserversamples.codeplex.com/wikipage?title=SQL%20Server%202012%20Master%20Data%20Services%20

  • List all the table names and no of records in DB.

    Hi,
    How can i write a select query which should give the total tables in the database and the number of records in each table.
    Eg: I have 2 table in the database 1. EMP 2. DEPT . EMP table has 14 records and DEPT has 4 records. Then the out put should come like following.
    TNAME RecCount
    EMP 14
    DEPT 4
    Regards
    Bond.

    Also if Table statistics have been gathered(analyze table or DBMS_STATS) then this can also be used:
    SQL> create table TEST_ABC
      2  (name_ABC varchar2(200));
    Table created.
    SQL> insert into TEST_ABC
      2  values('ABC');
    1 row created.
    SQL> insert into TEST_ABC
      2  values('DEF');
    1 row created.
    SQL> commit;
    Commit complete.
    SQL> select table_name, num_rows from all_tables where table_name = 'TEST_ABC';
    TABLE_NAME                       NUM_ROWS
    TEST_ABC
    SQL> analyze table TEST_ABC compute statistics;
    Table analyzed.
    SQL> select table_name, num_rows from all_tables where table_name = 'TEST_ABC';
    TABLE_NAME                       NUM_ROWS
    TEST_ABC                                2
    SQL>

  • From which table could i get all the Variants of a specific ABAP program?

    Hi,
    From which table could i get all the Variants name which belong to a specific ABAP program?
    Thanks.

    Hi,
    Check the table starting with TVAR*.
    Regards,
    Atish

  • From which table could i get all the Variants of a ABAP program?

    Hi,
    From which table could i get all the Variants name which belong to a specific ABAP program?
    Thanks.

    Hi Hoo,
    You can get the variants of a ABAB Program from table <b>VARID</b>. Give the report name to the VARID-REPORT field and you will the list of variants for this report under field VARID-VARIANT and VARID-ENAME is the user who created the variant.
    Otherwise, You can use the function module RM_GET_VARIANTS_4_REPORT_USER to get the variants of a report
    Thanks,
    Vinay

  • Is there a way to list all the file names (automatically) in a folder to dynamic text box?

    Hi,
    I would like to know whether FLASH AS3 has some option to get all the files names from a folder specified and show it in a dynamic text box? Whenever some new files added to this folder it should update the list accordingly.
    Thanks for any information in this regard.

    Not particularly experienced in this field myself, but I've found its just easier to implement an XML file which lists the contents of the folder. It just means that when you upload a new file you have to add it to the list in the xml file also. No real hardship once you figure out the mechanics of it

Maybe you are looking for