Need a query to list all table names

I have more than 500 tables in my database.
'insert_date' & 'update_date' columns are found in more than 100 tables with data type as date.
I need a query to list all table names and 'insert_date' , 'update_date' column's content.
Please Help
Lee1212
Message was edited by:
LEE1212

I have more than 500 tables in my database.
'insert_date' & update_date column is found in more
than 100 tables with data type as date.
I need a query to list all table names and
'insert_date' column's content.What do you mean by "column's content". A table can have many rows. Do you want to display all the distinct value for these columns?
Below is the query to get the tables which has columns insert_Date and update_date
select table_name
from user_tab_columns
where column_name ='INSERT_DATE'
or column_name ='UPDATE_DATE'
/You can write a PL/SQL block to retrive the distinct values of INSERT_DATE for these tables
declare
TYPE ref_cur IS REF CURSOR;
insert_date_cur ref_cur;
lv_insert_date DATE;
cursor tables_list IS
select table_name
from user_tab_columns
where column_name ='INSERT_DATE';
begin
for cur_tables in tables_list
loop
  OPEN insert_date_cur for 'SELECT DISTINCT insert_date from '||cur_tables.table_name;
  DBMS_OUTPUT.PUT_LINE(cur_tables.table_name);
  DBMS_OUTPUT.PUT_LINE('--------------------------------');
  LOOP
  FETCH insert_date_cur into lv_insert_date;
  EXIT WHEN insert_date_cur%NOTFOUND;
  DBMS_OUTPUT.PUT_LINE(lv_insert_date);
  END LOOP;
CLOSE insert_date_cur;
end loop;
end;I haven't tested this code. There might be some errors. Just posted something to start with for you.

Similar Messages

  • Need a query to list all the personalized objects under a given path

    Hello Gurus,
    Can you help me with a query that will give me a list of all personalized objects that are under a given path like /oracle/apps/per/...
    Thanks,
    Vinod

    Hi Vinod,
    You can get the details from Functional Administrator responsibility, personalization tab, enter the "Document Path" like /oracle/apps/per
    and check the "Personalized" checkbox. And you can import the personalization to the file system also. More details check the Note
    The query
    begin
    jdr_utils.listcustomizations('/oracle/apps/pon/award/completion/webui/ponCompleteAward2PG');
    end;
    Will give the details for only one page.
    Thanks.
    With Regards,
    Kali.
    OSSi.

  • PLEASE SEND ME SQL query to list ALL CONSTRAINTS ON EMPLOYEES TABLE FROM OU

    PLEASE SEND ME SQL query to list ALL CONSTRAINTS ON EMPLOYEES TABLE FROM OUTSIDE PP SCHEMA INCLUDING SCHEMA NAME AND CONSTraint NAME
    Username : PP
    Table : Employees

    I think you are looking for below query :
    SQL> SHOW USER;
    USER is "SCOTT"
    SQL> select owner,constraint_name,constraint_type,table_name,r_owner,r_constraint_name
      2    from all_constraints
      3    where constraint_type='R'
      4   and r_constraint_name in (select constraint_name from all_constraints
      5    where constraint_type in ('P','U') and table_name='EMP');
    OWNER                          CONSTRAINT_NAME                C TABLE_NAME                     R_OWNER                        R_CONSTRAINT_NAME
    TEST1                          ERL_EMP_FK_1                   R EMPLOYEE                       SCOTT                          PK_EMP
    1 row selected.Means, TEST1 user is having a constraint ERL_EMP_FK_1 on his table EMPLOYEE. Which is using PK_EMP (primary key of SCOTT user's 'EMP' [in the query])
    Regards
    Girish Sharma

  • How get all table name from database

    hi master
    sir
    how get all table name from database

    The big question is 'why'.
    Selecting from view 'dba_tables' will indeed give the list of all tables in the database, but that includes the dictionary tables and the internal tables, and many others that are probably not of interet to a person who needs to ask this question. Besides, the dba_tables view requires access to a DBA account.
    There are several other views: "user_tables" will list all the tables in this user's schema; and "all_tables" will list all the tables this user can access in some way.
    The above do not, of course, include any information about synonyms, sequences, views, indexes and so on.
    The correct answer and the meaningful answer may be two different things.

  • SQL query to list all collections, members, OS, SP, IP and if physical/virtual

    Hi guys, I have the below query which lists all the collections and their members, however I need to expand it to also include the OS, Service Pack, IP and if it's a physical or virtual machine.
    I've tried a few things but only made it worse. Is anyone able to expand the below code to include those extras??
    SELECT
    v_FullCollectionMembership.CollectionID AS 'CollID',
    v_Collection.Name AS 'CollName',
    v_FullCollectionMembership.Name AS 'SystemName'
    FROM
    v_FullCollectionMembership, v_Collection
    WHERE v_FullCollectionMembership.CollectionID = v_Collection.CollectionID
    ORDER BY
    CollID ASC, SystemName ASC

    Hi,
    These requirements could be found in several threads or blogs. We need convert WQL to SQL, and you can involve SQL guys to integrate the statements and format the result.
    How to create a all virtual machines collection.
    SCCM SQL Query - IP Address
    ConfigMgr Systems without Current Service Packs, and System Patch Status 

  • List All Tables in a Microsoft Access Database

    Hello,
    I am writing in a Java code. This code analyze a Microsft Access Database file and then print a report about it.
    The connectivity between Java and the Database is fine, but My problem is that I want to display ALL Table names of the Database:
    For example: if the database is save in a file Data.mdb and if the database contain tables: Customer, Employee, Sales. I want a way to get those names!. I tried to excute a query "Desc Data" but it gave me SQL error sayas that you are allowed to use Select, Insert, Delete and Update keyword only.
    Any HELP?

    you can do it the following way...
    using your Connection obj (say connection)
    DatabaseMetaData dm = connection.getMetaData();
    ResultSet rs = dm.getCatalogs();
    String cat = null;
    if(rs.next())
    cat = rs.getString("TABLE_CAT");
    String[] str = new String{}["TABLE"]
    rs = dm.getTables(cat,null,null,str);
    while(rst.next())
    System.out.println("Tables"+rs.getString("TABLE_NAME"));
    kind regards
    Oliver

  • Is there a list of table name and object name? (oCompany.GetBusinessObject)

    Hi,
    How do I find the objects regarding the tables in SBO?
    Example Item Master, I use following statement:
    SAPbobsCOM.Items oItem;
    oItem = ( SAPbobsCOM.Items ) oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oItems);
    I like to find the object for SPP1.
    Is there a list of table name and object name?
    Thank you,
    Rune

    Thank you, Owen,
    Yes, I found the table name and method name in SDK Help Center:
    On your P/C, click START. Select All programs , SAP  Business One > SDK > SDK Help Center. Then select  DI API, then DI API Reference. If you scroll down this window you will find all existing classes. You will then find the SpecialPrices and the SpecialPricesDataAreas. All the information required to code is in there.

  • Export all tables' name under user by informatica

    Hi,
    I have a requirement about informatica mapping,
    we want to user one mapping to export all tables' name under user,
    like sql :
    SELECT t.OWNER || '.' || t.TABLE_NAME ||
    FROM all_tables t
    WHERE t.OWNER = 'BIEBS';
    How to realize it?
    Thank you!

    Get the table all_table in source analyzer save it. While building the map choose this as ur source, modify source qualifier as select table_name,table_name from all_tables where table_name='BIEBS'.
    Once u have this, use an expression transformation to build ur expression and load it into a flat file.
    Please mark this answered or helpful if it solves your purpose.
    Rgds.

  • What's the query to find all requests' name of all modules EBS R12.1.3??

    What's the query to find all requests' name of all modules EBS R12.1.3??
    Regards:
    Shahzad M. Saleem

    Dear rioman !!!
    Thanks!!
    Regards:
    Shahzad M. Saleem

  • SSRS Reports level how to find out All tables names & columns list to display dynamically SQL Query????

    Hi Team,
    I Have one requirement,In SSRS Reporsitory 3000 reports are available.
    My end user requirement All 3000 reports are used Table names & columns list of each wise to display single table or single result set.
    I find out all 3000 reports details are diplayed single results set like
    Report Id,Path,Dataset,Source Query Text,Datasource
    In Source Query Text  column level All reports Queries are available but I want Each Report wise Table name & columns List.If any solution Please share me.
    Regards
    Rama

    Hi Ramakoteswara,
    According your description, you want to show used tables and columns of each report, and display is into a single result set. Right?
    In this scenario, we don't know where to find a column contains the Source Query Text. With my understanding, in Reporting Services, we have Catalog table in ReportServer DataBase, it has a column called Content stores the report code (.xml). In the
    code we can find the Query and Fields. Then you need to use VB/C# code to parse each .xml code of each report and fetch out the table name and columns. We do not support writing any queries against SSRS DataBase or parsing data records in any
    table.
    If you have any question, please feel free to ask.
    Best Regards,
    Simon Hou

  • SQL query to return list of table names.

    Hi all,
    I'm looking for a query that will return a list of the table names that exist in my Microsoft Access database.
    Any ideas?

    http://forum.java.sun.com/thread.jsp?forum=31&thread=348287
    http://java.sun.com/j2se/1.4.2/docs/api/java/sql/DatabaseMetaData.html
    I would suggest you strat to use the search at the upper right.
    You can leave it blank and the advanced search will appear.
    You can then select the specific areas you want to search.

  • Need a query to find a table by two of its column names

    I work in software quality assurance. Oftentimes I am trying to figure out from which table data is being pulled, but the database has thousands of tables to look through. Instead of looking through all the tables, I just take a guess at one of the column names and execute a query like this:
    SELECT table_name FROM information_schema.columns WHERE column_name like '%pur%code%'
    That usually works, but occassionally it can return hundreds of table names which doesn't help me much. Instead, I'd like to form a query that could take two column names and return all the tables that have those columns.
    So, in English, I want to say:
    "Give me the names of all the tables that have a column named like %pur%code% and another column named like %client%loc%"
    How do I do this?

    One might have hoped that the QA guy actually had sufficient documentation to tell him which table information was "pulled from".
    (or is he actually checking that the documentation is accurate and complete .... )
    SQL> select phrase from well_known
             where upper ( phrase ) like '%PIG%' and upper ( phrase ) like '%FLY%'

  • Query Builder List of Report Names & their corresponding Folder Names

    HI there,
    I have in excess of 6000 reports deployed in my Crystal system.
    I need to pull 2 sets of data:
    1. I need a list of all report names & their corresponding folder names
    2. I need a list of all report names & their corresponding folder names where:
           a) The destination for the schedule is set to Email
           b) The 'to" field contains any email addresses with the value @fcl.internal in them
    Grateful for any assistance you can provide.
    Many thanks....Corinne

    This is a challenge that will require multiple queries or an application using the the SDK.
    To get the folder where a report is located, you'll need to query CI_INFOOBJECTS where SI_ID = the PARENT_ID value in the report.  To get the entire path, you'll have to "walk" up the PARENT_ID values until the value is 0, which is the root folder.
    I'm not sure whether you can get to the SchedulingInfo properties in the report to filter based on your second requirement - I'm working on an application to pull this information in my "copious" spare time, but I haven't had the opportunity to get into that part of the application yet.
    For some samples of code using the .NET SDK to do various thing, see my website at [www.dellstinnett.com/sample_code.html].  Code for walking the folder path is in the BOECommonInfo assembly.
    -Dell
    Edited by: Dell Stinnett on Nov 29, 2010 4:49 PM
    Edited by: Dell Stinnett on Nov 29, 2010 4:50 PM

  • How to find out all table names which has a particular data

    Hi,
    How could i get all the table names from a database(for a schema) which has data 'KST6490' in one of the fileds in the table.There are many tables with this
    data. Data type is Varchar2. Thanks.

    One approach would be to create a procedure which retrieves the name of all tables in the schema using the user_tables view. Then use the user_tab_columns view to get all the column names and types. If the type is varchar2, then dynamically create a sql statement which runs a query on that column using the value which you are looking for. You would need two cursor loops for this approach: one for tables and one for columns. This approach requires good PL/SQL programming skills.
    Alternately, many query tools, such as Golden, provide a search capability on query results. Just do a select * from the table and search on the results. This would need to be done table by table and the results would have to fit in the memory available to the tool.
    Alternately, you can write table contents to a text file on the a server and then search the text file using operating system tools such as grep. This would require good OS scripting skills.

  • Query to get all tables related to a given table directly or indirectly

    Does anyone have a query to get a list of tables that are directly or indirectly related to a given table by foreign keys?
    I used a CONNECT BY clause to get a list of all child tables and their child tables and so forth by going against the ALL_CONSTRAINTS table. I then UNIONed the result with another query that got all the parents/grandparents etc. for this table.
    I realized that I then need to get all the other child tables of these parent tables and their children and it sort of ran into an endless number of unions because we're traversing up and down a tree and are starting out from the middle.
    Is there a better way to do this?
    Thanks,
    Mohit

    Hello!
    Do you know transaction SUIM. From there you can find all roles with a given authorization. If you need a function maybe you can look which functions are used behind SUIM. For the tables check the table behind the fields in the transaction with F1.
    Best regards,
    Peter

Maybe you are looking for

  • Use SkyDrive to upload collected files and post screen shot/picture. (Updated: 1/16/2012)

    To help community members troubleshoot issues efficiently, sometimes we need to collect related files (such as Event logs, Network traces, Setup log files, Screenshots, etc.) to perform a specific analysis.  We can simply use SkyDrive, which is a fre

  • Import bookmarks from html not working (YES, I know it really IS an html file and not JSON)

    My objective is to make a global edit to the bookmarks in one folder. To do so, I exported to an HTML file, opened that file in Notepad, deleted all the other bookmarks, and did a search-and-replace to correct the ones I was trying to fix. Saved the

  • Can't Install SB LIVE DRI

    Hi guys, I have SB LIVE 5.(SE). model: sb000 I don't have the installation disk. I Downloaded from creative Website the file SB24_WEB64_LB__04_0055.exe but I try to install it I get an error message: "setup is unable to to detect a supported product

  • Using 2 routers for only 1 network

    Hey,      I am new to this stuff, so please guys explain in terms that will be easy for a novice to understand.  I have a qwest router connected to dsl.  It currently provides a wireless g signal and I have my entire house wired or wirelessly connect

  • Parallax Scrolling and HiDPI in Adobe MUSE

    Hi all, I have a small problem. I've upgraded to the latest version of Adobe Muse and enabled on my latest project the HiDPI feature. I've now found that when I replace the pictures linked to my parallax scrolling effect, the pictures are not the cor